From a20c614010580dfb6ac182bdb3661777bbe50955 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Wed, 18 Oct 2023 09:59:02 +0200 Subject: [PATCH] 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 --- pkgs/tools/misc/fzf/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 29f87b4ffdd0..be7992f94af5 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 <