Space character when searching a files name and path

Discussion related to "Everything" 1.5 Alpha.
Post Reply
hellen_dorandt89
Posts: 52
Joined: Sun Apr 03, 2022 5:52 pm

Space character when searching a files name and path

Post by hellen_dorandt89 »

In allot of programs (VScode, Obsidian, KeyPirinha etc ) when searching for files the space character is not mandatory. So in these programs if you have files such as:

Code: Select all

My Text File.txt
My Image File.jpg
My  Audio File.mp3
Its possible to search
mytxt
or
mytexf
when searching for
My Text File.txt
.
Also typing
myfile
or
mile
will find all three above files. The space character is treated as optional.
In everything (with all the filters disabled) with the same three files, space is always required. Searching for
mytxt
,
mytext
or
myfile
or
mile
will not find any of the three files.
Things get slightly better with the filter
Ignore White-Space
but even then that requires whole words to match a file.
mytext
will find a match, while
myfile
not match anything.

Currently is their a way to enable "fuzzy" search? (space anywhere in the file name or full path being optional)?

Any help would be greatly appreciated!
void
Developer
Posts: 16899
Joined: Fri Oct 16, 2009 11:31 pm

Re: Space character when searching a files name and path

Post by void »

This can be done with the #regex-replace: preprocessor function:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to: fuzzystar
  • Change the Search to: *#regexreplace:<search:,.,\0*>
  • Change the Macro to: fuzzystar<search>
  • Click OK.
  • Activate your fuzzystar filter:
  • Filters can be activated from the Search menu, Filter bar (View -> Filters), right clicking the status bar, filter macro or filter keyboard shortcut.
Searches like mytxt or mytexf match too many files, so I don't think you'll find this too useful..
frozax
Posts: 1
Joined: Tue Sep 12, 2023 7:24 pm

Re: Space character when searching a files name and path

Post by frozax »

Thanks, that's very useful!
Here is my use case: I wanted to using Everything as a way to run frequent commands quickly.
So I will create a bunch of .bat/.cmd files in a custom folder, for example (for a developer):
  • svn check for modification project1.cmd
  • svn check for modification project2.cmd
  • svn clean up project1.cmd
  • git status project3.cmd
  • open folder code.cmd
  • open folder resources.cmd
  • open terminal project1.cmd
  • build project1.cmd
I think you get it, but all command I very frequently use are in there, so I have a "path:" filter and fuzzystar if therefore very convenient and time saving.

Thanks for Everything.
Post Reply