You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In doing so, it seemed to me there were really a lot of options that could be quite reasonable for fdfind, notably the --glob parameter, which makes the launcher's find command behave more like a command-line pattern match (as opposed to the regex style pattern match that is currently the default).
My first impulse was to make the find command take a config.ron that allows to choose glob vs regex. However, I realized the entire find plugin is a great example of a potentially reusable pattern--
Given a CLI command that lists results as output (e.g. fdfind)
and a set of arguments to pass in as defaults (e.g. --full-path, --regex, --glob, etc.)
pass the search-term as last argument to the CLI tool
display each line from STDOUT as a corresponding result in the launcher
pass the result to a command to run when executed
To my surprise, this pattern is actually already built for URLs--it's the web plugin! We just need something that behaves this way for CLI tools.
Would it make sense to either
(a) modify the find plugin to be more versatile so that it has a config.ron similar to the web plugin, but to use CLI commands instead of xdg-open, or
(b) create an entirely new plugin that does the same?
I'm kind of thinking (a) makes more sense since if I build this, then the current find command would become simply a setting to add to the config.ron of this modified plugin (i.e. the modified plugin would functionally be a superset of the find plugin).
Any thoughts or guidance before I dig in?
The text was updated successfully, but these errors were encountered:
I'm open to the idea. I've had on my backlog of ideas to integrate Rhai into the launcher so that plugins can be written as Rhai scripts internally executed by the launcher.
I recently modified the
find
plugin to add the--full-path
arg to the underlyingfdfind
CLI.In doing so, it seemed to me there were really a lot of options that could be quite reasonable for
fdfind
, notably the--glob
parameter, which makes the launcher'sfind
command behave more like a command-line pattern match (as opposed to theregex
style pattern match that is currently the default).My first impulse was to make the
find
command take aconfig.ron
that allows to chooseglob
vsregex
. However, I realized the entirefind
plugin is a great example of a potentially reusable pattern--fdfind
)--full-path
,--regex
,--glob
, etc.)To my surprise, this pattern is actually already built for URLs--it's the
web
plugin! We just need something that behaves this way for CLI tools.Would it make sense to either
find
plugin to be more versatile so that it has aconfig.ron
similar to theweb
plugin, but to use CLI commands instead ofxdg-open
, orI'm kind of thinking (a) makes more sense since if I build this, then the current
find
command would become simply a setting to add to theconfig.ron
of this modified plugin (i.e. the modified plugin would functionally be a superset of thefind
plugin).Any thoughts or guidance before I dig in?
The text was updated successfully, but these errors were encountered: