The FARR command dosearch lets an alias perform a new search and display the results. We can use search folder modifier keys and trigger long search patterns from a short alias. Great! But dosearch has no options to adjust the results line for each search match.
This request is an enhanced dosearch command, call it dosearchformatresults, that lets us format the search result lines.
One idea for the syntax is to put result formatting at the end after a frontslash and keyword, like for the FARR window options and /icon=... instructions. Like this
The result formatting part would have the syntax we can use for results in aliases plus special variables related to each search match file. Example:
Probably some more complex escaping of characters and other ways to avoid weird conflicts/loops would be needed (recursive dosearchformatresults might cause weird issues for example
).
We can already achieve something like what I'm requesting via external scripts and appcapresults. But that is complex and FARR could probably do it quicker. The external workflow steps goes like this:
- FARR alias that passes a regex match from the typed string in FARR to an external script via dolaunch and appcapresult
- for each match prepare a result line with the showfilehtml command
- result lines are passed back to FARR via stdout when the script exits
- FARR's appcapresult reads the results and displays them
- the user selects a result and presses Enter to view the HTML page inside FARR
In this external workflow FARR starts an external process and waits for it to finish for each typed character, which I've seen can cause some slowdowns.
This animation illustrates how it looks.
https://i.imgur.com/6LEOsFM.mp4
The .html files in the illustration are derived from the TLDR project - a neat collection of short usage examples for CLI commands in Linux/Windows - that I've converted from Markdown (previous post related to that).
This request is an enhanced dosearch command, call it dosearchformatresults, that lets us format the search result lines.
One idea for the syntax is to put result formatting at the end after a frontslash and keyword, like for the FARR window options and /icon=... instructions. Like this
Code
dosearchformatresults <regular dosearch syntax here> /result=<result formatting here>The result formatting part would have the syntax we can use for results in aliases plus special variables related to each search match file. Example:
Code
%filename% | showfilehtml %filepath%In this example FARR would perform a dosearch for .html files and then for each match show a result line that when triggered shows the .html files inside FARR, rather than open it in the default .html application (external browser).Probably some more complex escaping of characters and other ways to avoid weird conflicts/loops would be needed (recursive dosearchformatresults might cause weird issues for example
).We can already achieve something like what I'm requesting via external scripts and appcapresults. But that is complex and FARR could probably do it quicker. The external workflow steps goes like this:
- FARR alias that passes a regex match from the typed string in FARR to an external script via dolaunch and appcapresult
Code
dolaunch appcapresult C:\externalscript.exe $$2- external script that searches some folder for e.g. .html files with filenames that match the passed string(s)- for each match prepare a result line with the showfilehtml command
- result lines are passed back to FARR via stdout when the script exits
- FARR's appcapresult reads the results and displays them
- the user selects a result and presses Enter to view the HTML page inside FARR
In this external workflow FARR starts an external process and waits for it to finish for each typed character, which I've seen can cause some slowdowns.
This animation illustrates how it looks.
https://i.imgur.com/6LEOsFM.mp4
The .html files in the illustration are derived from the TLDR project - a neat collection of short usage examples for CLI commands in Linux/Windows - that I've converted from Markdown (previous post related to that).





) in this sentence.