Search fields - Auto wildcarded regex

Features wanted...
Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 05 Dec 2018 09:48

For the lack of a better acronym, in the following, MLFB = modals Live Filter Box = filter boxes from modal windows :
  • Tools - List Management - ...
  • Help - List All Commands
  • Tools - Configuration - Jump to Setting
  • Scripting - inputselect()
  • ...


A couple of thoughts after a few days of use:
  • I'd like to have an option to activate this shotgun behavior by default without having to use the LiveFilterShotgunPrefix.
  • Maybe this option should in fact be two options to differentiate the main LFB from MLFB. Why differentiate them? Because on the MLFB, your goal is often (almost always?) to select only one item, whereas on the LFB, your goal isn't usually to have only one file remaining. Personally, I would enable shotgun on MLFB but not on LFB.
  • Highlight (spot patterns) isn't enabled on the files list when shotgun is activated. Maybe a bug?
  • I'd like to see highlighting as well when using MLFB (with shotgun or not). Not sure if SpotColorsList should be used to do this highlighting or if simply writing the spot patterns in bold would be enough and more elegant.

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 14 Jan 2019 12:13

Amending my previous post:
Leito wrote:
05 Dec 2018 09:48
  • Highlight (spot patterns) isn't enabled on the files list when shotgun is activated. Maybe a bug?
Spot patterns aren't visible when using the regex mode (">") on the LFB, so this is probably why they're not visible as well with the shotgun.

admin
Site Admin
Posts: 46392
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Search fields - Auto wildcarded regex

Post by admin » 14 Jan 2019 18:50

Leito wrote:
14 Jan 2019 12:13
Amending my previous post:
Leito wrote:
05 Dec 2018 09:48
  • Highlight (spot patterns) isn't enabled on the files list when shotgun is activated. Maybe a bug?
Spot patterns aren't visible when using the regex mode (">") on the LFB, so this is probably why they're not visible as well with the shotgun.
The reason is: In those modes they are too hard to mark. So I just chickened out.

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 15 Jan 2019 08:29

:mrgreen: I understand. Any thought on my other points?
Leito wrote:
05 Dec 2018 09:48
  • I'd like to have an option to activate this shotgun behavior by default without having to use the LiveFilterShotgunPrefix.
  • Maybe this option should in fact be two options to differentiate the main LFB from MLFB. Why differentiate them? Because on the MLFB, your goal is often (almost always?) to select only one item, whereas on the LFB, your goal isn't usually to have only one file remaining. Personally, I would enable shotgun on MLFB but not on LFB.
  • I'd like to see highlighting as well when using MLFB (with shotgun or not). Not sure if SpotColorsList should be used to do this highlighting or if simply writing the spot patterns in bold would be enough and more elegant.

admin
Site Admin
Posts: 46392
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Search fields - Auto wildcarded regex

Post by admin » 17 Jan 2019 09:19

I will address the first 2 points in the next beta. :)

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 17 Jan 2019 14:10

Code: Select all

v19.50.0229 - 2019-01-17 11:36
    + Live Filter Box: Added tweak LiveFilterIsShotgun to enable shotgun mode 
      without the need to define and use a LiveFilterShotgunPrefix.
      The new tweak is a bit field:
        LiveFilterIsShotgun=1     'shotgun in the main LFB
        LiveFilterIsShotgun=2     'shotgun in the small LFBs in dialogs
        LiveFilterIsShotgun=3     'shotgun in both
      If the tweak is set then any present LiveFilterShotgunPrefix in your 
      pattern is NOT removed anymore, so you should not pass any prefix if the 
      tweak is set.
      The tooltip of the LFB icon tells you whether shotgun is enabled.
      Later the tweak might be lifted to the right-click menu of that icon...
Thanks!

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 17 Jan 2019 14:48

Code: Select all

v19.50.0229 - 2019-01-17 11:36
      The tooltip of the LFB icon tells you whether shotgun is enabled.
Just an idea: you could change as well the icon of the LFB (main LFB or smalls LFB in dialogs) to reflect if shotgun (or even regex) is active on the LFB. Something like this:
Image

admin
Site Admin
Posts: 46392
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Search fields - Auto wildcarded regex

Post by admin » 17 Jan 2019 18:52

Yes, looks nice. I already thought of changing the icon but I will wait. The feature is still under cover (tweak only)...

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 18 Jan 2019 08:41

:tup: Yes, it surely needs some improvements before becoming a GUI option.

Using the shotgun on small LFB, I've realized it's a bit too permissive in some cases. Take for instance this search on the "List All Commands" dialog: I want to call the command "Dark Mode":
  • Without shotgun, I just have to type "dark" ("dar" even...), and bam first result is the good one:
    Image
  • With shotgun, it's not so immediate: I have to add "mo[de]" (and remember that the command is called "Dark Mode", not "Dark Theme" or whatever) in order get the "Dark Mode" command at the top:
    Image
I think we need some kind of sorting when displaying the results (on dialogs, not the list), where the results matching the most are sorted on top. Now the question is: what does "matching the most" mean? I think the easiest solution would be to run the search without shotgun, display the results on top, then run the search with shotgun and display the results (minus those already displayed) at the bottom.

I'm sure there's better options even, where you could assign a higher sort to results that have two consecutive letters (then three, then four...) appearing also consecutively in the searched terms. But maybe that's a bit overkill and that would bog down performances. :roll:

admin
Site Admin
Posts: 46392
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Search fields - Auto wildcarded regex

Post by admin » 18 Jan 2019 09:35

Hm. Your demo nicely explains why I personally never liked/used the shotgun. :) IMO this is getting too complex...

highend
Posts: 7924
Joined: 06 Feb 2011 00:33

Re: Search fields - Auto wildcarded regex

Post by highend » 18 Jan 2019 09:39

A simpler way (because I like the shotgun tweak that was introduced with the latest beta):
Why not a tweak where you can define a character (not a-z^^) that you can type that disables the shotgun behavior in lfb / some search box?

In the last example e.g.:
#dark
and that would just display the dark mode because shotgun mode was disabled...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 18 Jan 2019 12:23

admin wrote:
18 Jan 2019 09:35
Hm. Your demo nicely explains why I personally never liked/used the shotgun. :) IMO this is getting too complex...
Well the shotgun is still useful in other ways. For instance, I want to call the command "Manage Favorite Files":
  • Without shotgun, I have to type several words (because all words of the command are very common, so one won't suffice), in the correct word, without messing the spaces or the plural:
    Image
    (Granted, I could have hit DownArrow twice after typing "manage", but some other commands won't work as nice)
  • With shotgun, I just have to type a few letters of each word I know, for instance "ma[nage]fa[vorite]fi[les]", and the command is at the top, just need to type Enter. This is way quicker:
    Image
highend wrote:
18 Jan 2019 09:39
A simpler way (because I like the shotgun tweak that was introduced with the latest beta):
Why not a tweak where you can define a character (not a-z^^) that you can type that disables the shotgun behavior in lfb / some search box?

In the last example e.g.:
#dark
and that would just display the dark mode because shotgun mode was disabled...
I'm not a fan, because you'll start typing using the shotgun, then you'll realize that it's not efficient, thus you'll add the character at the start of your search.

admin
Site Admin
Posts: 46392
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Search fields - Auto wildcarded regex

Post by admin » 18 Jan 2019 17:47

Are you aware that you can use the Down and Up arrow keys in the filter box? No need to perfectly isolate your desired item...

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 18 Jan 2019 17:50

Yes I know and use them. Still quicker in some cases to sort on top (or near) the desired item, cause it takes time searching for your item if the filtered list still contains a lot of items.

Leito
Posts: 494
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Search fields - Auto wildcarded regex

Post by Leito » 30 Jan 2019 14:04

I don't know about you highend, but I've stopped using the shotgun on small LFB. It's too permissive without a sort feature that sorts better results on top.

Post Reply