Search Preprocessor Suggestions

Discussion related to "Everything" 1.5 Alpha.
Post Reply
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Search Preprocessor Suggestions

Post by NotNull »

Worth mentioning:

The #clipboard: Search Preprocessor function is dynamic. That means that when you enter the following in the search bar:
#clipboard:

and press CTL-C on 'abc' in Notepad, Everything will start seraching for 'abc'.
Copy 123 to the clipboard and Everything will search for '123'

Very nice feature!
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Preprocessor

Post by void »

Official Search Preprocessor Help Page
The #clipboard: Search Preprocessor function is dynamic. That means that when you enter the following in the search bar:
Done.
Thank you for the suggestion.

Changes to the syntax for Everything 1.5.0.1262a:
#function:arg1,arg2,arg3,...
#function:<arg1,arg2,arg3,...>
#(function:arg1,arg2,arg3,...#):
#<function:arg1,arg2,arg3,...#>:
#<:a literal block of text#>:
#(:a literal block of text#):
"an exact phrase"

Calling from the command line is still experimental and syntax may change in a future update.

Some functions will not work from the command line yet.. I am working on a fix.

I will add your [ and ] suggestions too.
eg: #[function:my text#]:

This should be quite safe to call from the command line or powershell.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Search Preprocessor Suggestions

Post by NotNull »

void wrote: Fri May 28, 2021 7:11 am I will add your [ and ] suggestions too.
eg: #[function:my text#]:
The idea behind the [] was to replace the < and > with [ and ] as <> are redirection symbols (CMD/ PowerShell/bash/wsl/...) to prevent an extra round of escaping characters.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Preprocessor Suggestions

Post by void »

Syntax like: #len:[abc] or #len:(abc) would break too much existing syntax.

I still need to use the #xxx: syntax to avoid any conflicts with the existing Everything syntax.

The [ and ] would need to appear inside the # and :

Examples:
Everything.exe -s #[len:abc#]:
Everything.exe -s #[year:#now:#]:-#[text:#[month:#now:#]:,00#]:-#[text:#[day:#now:#]:,00#]:


I am also going to allow { and } as it is easier to type.
Everything.exe -s #{year:#now:#}:-#{text:#{month:#now:#}:,00#}:-#{text:#{day:#now:#}:,00#}:


I know of one conflict with regex:
regex:[#[:digit:]a-z]
This would still work as long as there is no terminating #]:
regex:[#[:digit:]a-z]|[a-z#]:
=>
[digit:]a-z]|[a-z


Some ideas borrowed from TTM, C Preprocessor and Tcl.

For the most part, the Everything Search Preprocessor is just an extension built onto the existing Everything search syntax.
Post Reply