I am now reading about regexes. It's quite powerfull, and associated with what we are discussing here, it might lead us to very good results, i think.
From what i understand, a regex like this:
(["][A-Z0-9. ]*["] ){0,1}edit( ["][A-Z0-9. ]*["]){0,1}
would accept entries like this:
"jgpaiva.txt" edit OR
edit "jgpaiva.txt" OR
"jgpaiva.txt" edit "donationcoder.txt"And farr already does this. (the testing box in farr's alias group editing is really useful
)
The inconvinience with the version that farr has now, is that there is no way to ease the entry of the file names. So, to edit something, you'd have to do:
"C:\documents and settings\joao\my documents\jgpaiva.txt" edit to edit that file.
Which doesn't make sense when you have such a great power of search already included in farr.
So, my proposition to implement this, is to have farr work like this:
You search for anything, and when you press tab, that anything is replaced internally by it's result.
Meaning, when i search for
jgpaiva.txt and press tab, the line to be executed by farr would be
"C:\documents and settings\joao\my documents\jgpaiva.txt" . Then, the search field searches for possible aliases, since the first thing i selected was a file.
I type
edit and my group edit is selected (important: here, farr adds a space to the end of the expression to be evaluated after the word edit, or the following won't work).
Now, if i press enter, the regex is evaluated, and jgpaiva.txt is opened in the editor i had selected.
If i press tab again, my regex specifies that afted "edit " can come anything, and so, the search alows anything to be used. I search for donationcoder.txt, press enter, it's path is quotated, added to the end of the regex, the regex is evaluated and my editor is launched with both documents.
I think that the only problem with this, is that the searches wouldn't be only by the string typed, but also using the rules defined by the last regular expresion selected.
What do you think, mouser? Any problems with this solution?
PS: The regex i presented is highly incomplete, as it doesn't contain the search for only text files, nor it allows fullpaths to be specified. I only presented it like that, for the sake of understandment, since the whole regex would have about 3 or 4 lines
Of course, this kind of "basic action" regexes would come with farr v2, so as the user doesn't have to configure them.
PS2: as this post was very tiring, i'm going to bed.
(g!, regexes are confusing
)