Unverified Commit a20c6140 authored by r-vdp's avatar r-vdp
Browse files

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
parent 458ef912
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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}