Search fields - Auto wildcarded regex

Features wanted...
highend
Posts: 8204
Joined: 06 Feb 2011 00:33

Search fields - Auto wildcarded regex

Post by highend » 26 Feb 2017 19:09

Hard to describe this...

Let's say we're using inputselect() to show a list of folders and we want to select a specific one
of the results by typing into the provided searchbox (with the least minimal strokes). Notice
that this list is only hypothetical.

Code: Select all

C:\Users\Highend\AppData\Microsoft\Windows\Programs
C:\Users\Highend\AppData\Microsoft\Windows\Programs\StartUp
C:\Users\Highend\AppData\Roaming\Microsoft\Windows\Programs
C:\Users\Highend\AppData\Roaming\Microsoft\Windows\Programs\StartUp
The goal is to select the last entry
You could use "roa" (for "Roaming")
to get only the last two ones
or "up"
to get the second and the fourth

And sure, you could use the cursor keys afterwards but imagine that list
contains dozens or hundreds of (partly similar) entries.

What I whish?

Either a tweak (preferred) that puts all search fields (e.g. Configuration - Jump to... has one as well)
into a special regex mode or as an alternative, a prefix (e.g. ":" but should probably be tweakable)
that works like this
^.*<char 1>.*<char 2>.* ... .*<char x>.*$
While the number of typed chars can range from one to ~...

This allows to just type (tweak version):
roaup
which matches only the last entry

You may say: Who needs this?
Me^^

And probably everybody else who wants to narrow down (larger) lists while typing
only the minimum characters needed.

I'm trying to get rid of the tree completely and my favorites script lists all (sub-) folders
in specific locations but narrowing this list is a bit cumbersome without this feature...

E.g. ReSharper (from JetBrains) extends Visual Studio IntelliSense in the same way, which
makes typing + selecting methods, properties, etc. a really pleasant experience
intellisense.png
intellisense.png (20.36 KiB) Viewed 643 times
Try this once and you'll never want to use something else (I'm not talking about VS / ReSharper) :)
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Search fields - Auto wildcarded regex

Post by highend » 27 Feb 2017 06:25

Another post where the potential of this addition would come through:
viewtopic.php?f=5&t=17105&p=146893#p146893

Search field = Live Filter Box
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Filehero
Posts: 2283
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Search fields - Auto wildcarded regex

Post by Filehero » 27 Feb 2017 06:44

+1

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

Re: Search fields - Auto wildcarded regex

Post by admin » 27 Nov 2018 09:42

Okay, but why RegExp? Isn't it just this?:

Typed pattern: abc
Auto-converted to: *a*b*c*

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

Re: Search fields - Auto wildcarded regex

Post by highend » 27 Nov 2018 09:52

Regex would allow more sophisticated features like using positive / negative lookaheads (even in this context).
But for a basic "fire-and-forget" solution *-autoembracing would work as well
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Search fields - Auto wildcarded regex

Post by admin » 27 Nov 2018 11:06

So, in which places would you like to see this?

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

Re: Search fields - Auto wildcarded regex

Post by highend » 27 Nov 2018 16:07

If possible in all (live) filter boxes^^

E.g.:
Tools - List Management - <all menu entries>
They all use the same interface and same live filter box

-> Help - List All Commands...
-> Tools - Configuration - Jump to Setting...

-> Scripting - inputselect()

Even the normal live filter box for panes would profit from this behavior.

The default value should be "off" and it would be better if this can be switched
on/off in the config dialog instead of only a tweak and a necessary restart
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Search fields - Auto wildcarded regex

Post by admin » 27 Nov 2018 16:13

Needs some thinking. Codename shotgun...

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

Re: Search fields - Auto wildcarded regex

Post by highend » 27 Nov 2018 19:54

I've reread my own first posting and think that using a special operator as an additional option would be a nice addition.

So:
- Still a config option in the GUI if auto-wildcard-embracing is on or off (off by default)
and
- Using a prefixed special operator (probably a char that isn't allowed in file / foldernames like ">" (as it is used to switch the normal search into regex mode)). Really cool would be, if we could tweak that special operator to whatever we want (I for myself would probably use the "." (dot) instead of ">")

So that even if the GUI option is off you can use the special operator to turn it (temporarily) on for the current live filter box
When the GUI option is already on, the special operator is just ignored

Best of both worlds and usable even without turning it on for all for all LFBs...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Search fields - Auto wildcarded regex

Post by admin » 27 Nov 2018 20:07

I'd prefer a customizable prefixed special operator for starters.

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

Re: Search fields - Auto wildcarded regex

Post by highend » 27 Nov 2018 20:11

I've probably changed the wording of my last post while you were reading it. Please read it again
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Search fields - Auto wildcarded regex

Post by admin » 28 Nov 2018 19:51

I added it as a tweak, but I it does work as good as I expected. I find it hard to filter what I want using this method. Try yourself...

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

Re: Search fields - Auto wildcarded regex

Post by highend » 28 Nov 2018 20:20

I like it but I'm used to such kind of behavior. If you use it frequently your brain is building mnemonics for
items that require either a lot of typing or (with less typing) leave a lot of items to choose from.

Thanks for implementing it!
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Search fields - Auto wildcarded regex

Post by Leito » 28 Nov 2018 21:11

Definitely interesting...

I'm used to this as well via VS Intellisense (no need for Resharper to have this behavior btw) and it is definitely a nice addition.

Which characters are supported for the tweak pattern? I've tried to use ">" but it doesn't work.
Nevermind, I'm dumb.

Nighted
Posts: 435
Joined: 21 Jan 2007 01:58
Location: Gitmo Nation North, Win 7/10/Linux/(x64)

Re: Search fields - Auto wildcarded regex

Post by Nighted » 28 Nov 2018 22:14

Excellent! :appl:
I want XY to serve soft ice cream. Please Don, make XY serve soft ice cream.

Post Reply