summary refs log tree commit diff
diff options
context:
space:
mode:
authorInternetUnexplorer <internetunexplorer@gmail.com>2022-12-08 22:38:00 -0800
committerInternetUnexplorer <internetunexplorer@gmail.com>2022-12-08 22:52:09 -0800
commit86ae48a4bf2387f6ea3ec413506f8f4be3ed2722 (patch)
treec943177bc5a426557e9c19662010c8e4f9a7b899
parent1c9ffcf70786f0966982ce0fc76ec05df2e1dec2 (diff)
downloadnixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.tar
nixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.tar.gz
nixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.tar.bz2
nixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.tar.lz
nixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.tar.xz
nixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.tar.zst
nixpkgs-86ae48a4bf2387f6ea3ec413506f8f4be3ed2722.zip
skim: fix fish shell keybindings
This fixes a typo that prevented the fish keybindings from being loaded.
Also, the keybindings are now only loaded if programs.skim.keybindings
is true, which matches the behavior for bash and zsh.
-rw-r--r--nixos/modules/programs/skim.nix6
-rw-r--r--pkgs/tools/misc/skim/default.nix4
2 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/programs/skim.nix b/nixos/modules/programs/skim.nix
index 1333cdd30ab..57a5d68ec3d 100644
--- a/nixos/modules/programs/skim.nix
+++ b/nixos/modules/programs/skim.nix
@@ -6,7 +6,7 @@ in
 {
   options = {
     programs.skim = {
-      fuzzyCompletion = mkEnableOption (mdDoc "fuzzy Completion with skim");
+      fuzzyCompletion = mkEnableOption (mdDoc "fuzzy completion with skim");
       keybindings = mkEnableOption (mdDoc "skim keybindings");
       package = mkPackageOption pkgs "skim" {};
     };
@@ -26,5 +26,9 @@ in
     '' + optionalString cfg.keybindings ''
       source ${cfg.package}/share/skim/key-bindings.zsh
     '';
+
+    programs.fish.interactiveShellInit = optionalString cfg.keybindings ''
+      source ${cfg.package}/share/skim/key-bindings.fish && skim_key_bindings
+    '';
   };
 }
diff --git a/pkgs/tools/misc/skim/default.nix b/pkgs/tools/misc/skim/default.nix
index 3a999bb0e20..bdd6221d667 100644
--- a/pkgs/tools/misc/skim/default.nix
+++ b/pkgs/tools/misc/skim/default.nix
@@ -30,9 +30,7 @@ rustPlatform.buildRustPackage rec {
     install -D -m 444 plugin/skim.vim -t $vim/plugin
 
     install -D -m 444 shell/* -t $out/share/skim
-    install -D shell/key-bindings.fish $out/share/fish/vendor_functions.d/sk_key_bindings.fish
-    mkdir -p $out/share/fish/vendor_conf.d
-    echo sk_key_bindings > $out/share/fish/vendor_conf.d/load-sk-key-bindings.fish
+
     installManPage man/man1/*
 
     cat <<SCRIPT > $out/bin/sk-share