man fzf)printf 'foo\nbar' | fzf --bind 'enter:execute(echo {})'
typing test
press enter
expect test being echoed
actual the execute action isn't executed at all.
Can we have an execute variant that runs no matter if there is a selected candidate?
If the command template contains {q}, the action will trigger even when {} is null.
printf 'foo\nbar' | fzf --bind 'enter:execute(echo {}/{q}; sleep 1)'
Sorry for the necro, but is there a way to automatically exit with 0 status in this situation? I've tried the -0 flag, and also
$ printf 'foo\nbar' | fzf --bind 'enter:execute(echo {}/{q}; exit 0)'
You can use --print-query and process the output using shell script.
Most helpful comment
If the command template contains
{q}, the action will trigger even when{}is null.