I'm trying to get fzf to use
rg --files as its command for searching, but can't seem to get it to use the
$FZF_DEFAULT_COMMAND environment variable, as described in the docs.
fish as my shell, and in my
config.fish I have
set FZF_DEFAULT_COMMAND rg --files
. If I echo $FZF_DEFAULT_COMMAND
in my shell, I getrg --files`, so fish is definitely aware of it.
However, when I call
fzf it doesn't use this command (for example, it shows gitignored files, such as build outputs etc, but if I just call
rg --files, these aren't shown).
The man page for
fzf says: "On *nix systems, fzf runs the command with
sh -c, so make sure that it's POSIX-compliant". However, if I run
sh -c "echo $FZF_DEFAULT_COMMAND, I get
Clearly this env var isn't available in the right place, but I'm at a bit of a loss to know how to set it properly. Any help appreciated