Using fish shell, I've defined the following function in ~/.config/fish/functions/foo.fish
:
function foo
echo $argv
end
Quick test in a new fish shell shows that fish has picked up the function:
$ foo bar
bar
In my vifmrc
file, I've defined the following filetype
handler:
filetype *.txt foo %f | less
If I now attempt to open a test.txt
, I'd expect less
to open with the contents test.txt
since I've used the %f
macro.
I found an old zsh issue regarding aliases, but the shellcmdflag
option wont do me much good since the following works just fine:
$ fish -c 'foo test'
test
Or am I misunderstanding how vifm
invokes commands in the context of filetype
handlers?