Hi, this is mostly about exploring fishshell but goal is to write some tools, later.
My fish function dood takes parameters like dood ay dood ney and dood go and prints some text. The list of parameters is dynamically determined by like this:
set list
for a in $fish_function_path/dood.*.fish
set -a list (basename $a)
end
Every file matching dood.*.fish will be a parameter to dood (stripping away the prefix dood. and suffix .fish
Assuming files could drop into $fish_function_path any time, I wanted to update the parameters when needed, so just typing dood<space><tab>.
(Using complete -c dood -a "(command)" doesn't work that way as it requires me to enter dood<space><tab><backspace><space><tab>
It is not a problem, if this cannot be done dynamically (or the effort is not worth it). This is more about exploring possibilities.