diff options
author | r-vdp <ramses@well-founded.dev> | 2023-10-18 09:59:02 +0200 |
---|---|---|
committer | r-vdp <ramses@well-founded.dev> | 2023-10-19 09:20:16 +0200 |
commit | a20c614010580dfb6ac182bdb3661777bbe50955 (patch) | |
tree | 33c96886f7e79dd9326a807380000114c0302424 /pkgs/tools/misc/fzf | |
parent | 458ef9126aa380996d77d44f53f886c2d8485f53 (diff) |
fzf: fix fish integration
Since fzf 0.43.0, the fzf_key_bindings function is only defined when fish is running interactively, see [1]. This caused errors when entering non-interactive fish shells since we called fzf_key_bindings during startup. [1]: https://github.com/junegunn/fzf/commit/7e89458a3b58c047c10494a5cb53d921fb08b4f3
Diffstat (limited to 'pkgs/tools/misc/fzf')
-rw-r--r-- | pkgs/tools/misc/fzf/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 29f87b4ffdd08..be7992f94af5c 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -79,7 +79,10 @@ buildGoModule rec { install -D shell/* -t $out/share/fzf/ install -D shell/key-bindings.fish $out/share/fish/vendor_functions.d/fzf_key_bindings.fish mkdir -p $out/share/fish/vendor_conf.d - echo fzf_key_bindings > $out/share/fish/vendor_conf.d/load-fzf-key-bindings.fish + cat << EOF > $out/share/fish/vendor_conf.d/load-fzf-key-bindings.fish + status is-interactive; or exit 0 + fzf_key_bindings + EOF cat <<SCRIPT > $out/bin/fzf-share #!${runtimeShell} |