ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

request: dosearch_noregex (dosearch but ignore regex in other aliases)

(1/2) > >>

Nod5:
Background
Imagine a user has these two aliases and one search directory item in FARR.

Alias1 (example of regex to get a single static result)
text: a
regex: ^a$
result: C:\folder\app.exe

Alias2 (example of regular expression aliases as search templates)
text: cdir
regex: ^(?:c|cd|cdi|cdir) (.+)$
result: dosearch +cdir $$1

Search Directory item
directory path: C:\cdir
optional modifier keywords: cdir

Problem case
The user types "c a" and want as result the list of files/folder in C:\cdir that contain "a".
But instead the result is "C:\folder\app.exe" . Because Alias1 is triggered by the new "a" search and since it is a regex alias it gets priority.

Collisions like that increase the more aliases of these two sorts one has. A pity since both sorts of aliases are useful.

Request for solution
Add a new virtual launch string named dosearch_noregex to FARR.
dosearch_noregex would start a new search but ignore all alias regex matches.

mouser:
Agreed, it would be useful to be able to bypass alias matches...

What about adding support for "-noalias" keyword in search -- if found it would bypass trying to match any aliases (regex or otherwise).  Would that also solve your case? (you would do a dosearch -noalias)?

mouser:
Oops I just realized this already exists.. You can use -alias to not match aliases, or +alias to only match aliases.

IainB:
Oops I just realized this already exists..
...
-mouser (February 11, 2018, 02:10 AM)
--- End quote ---
Your alter-ego seems to have been smarter than you are...
 :D   :D    :D

You tend to build some incredibly useful (if not brilliant) functionality into your software, and then seem to forget about it.
But is it documented?    ;)

mouser:
You tend to build some incredibly useful (if not brilliant) functionality into your software, and then seem to forget about it.
But is it documented?
--- End quote ---

I do tend to forget features I add, it's true.
Thankfully yes, it is documented.  That's the key isn't it -- to document these things as they are added.

From the help page on "Special Search Modifier Keywords":

+sall
show all matching results, bypassing the normal limit on result count

+alias
match search only against aliases

-alias
do not show any matching aliases (only files)

-history
do not give bonus scores to items in history

-.
do not show any files, only folders (and aliases)

-\
do not show any matching folders, only files (and aliases)

+\
show matching folders

+launchone
as soon as there is one (alias) result in the result list, launch it.

Navigation

[0] Message Index

[#] Next page

Go to full version