diff options
author | Basti <mail@sebastian-sellmeier.de> | 2024-04-11 20:15:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 20:15:14 +0000 |
commit | 8978af6b991fa8dfbefc3788a167b74bbd37df68 (patch) | |
tree | ba0eea59783f76a0aecb76b254b3b3c34450b9ee /pkgs/tools/misc | |
parent | fc019034528c5150e919a6c72799b805575b0618 (diff) | |
parent | 15ed0d212574c950e94e56f7ad7ec3c33ee8f772 (diff) |
Merge pull request #303213 from SuperSandro2000/fzf-followup
nixos/fzf: bring back keybindings and completion option removed in #298692
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/fzf/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 94ec13ead9e42..e2ae52985a504 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -1,6 +1,7 @@ { lib , buildGoModule , fetchFromGitHub +, runtimeShell , installShellFiles , bc , ncurses @@ -55,6 +56,23 @@ buildGoModule rec { install -D plugin/* -t $out/share/vim-plugins/${pname}/plugin mkdir -p $out/share/nvim ln -s $out/share/vim-plugins/${pname} $out/share/nvim/site + + # Install shell integrations + 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 + 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} + # Run this script to find the fzf shared folder where all the shell + # integration scripts are living. + echo $out/share/fzf + SCRIPT + chmod +x $out/bin/fzf-share ''; passthru.tests.version = testers.testVersion { |