I'm trying to set "fzf - Fuzzy finder for your shell" for the fish shell. The problem is that interactive commands don't work when I use it in command substitution. Example:
This command works: (echoes all the files in the current dir, and I can interactively select one by fuzzy-finder)
ls | fzf
But this one doesn't work:
echo (ls | fzf)
It just immediately returns empty string.
It doesn't work for any interactive command, so if you haven't fzf
, you can test it with, say, off the top of my head, chsh
:
This command works: (asks for password)
chsh
but this one doesn't: (immediately returns empty string)
echo (chsh)
More, when I try to exit fish, it says that "there are stopped jobs", i.e. interactive command starts and immediately stops.
How to make it work?