Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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.

+6 -4
+5 -1
nixos/modules/programs/skim.nix
··· 6 6 { 7 7 options = { 8 8 programs.skim = { 9 - fuzzyCompletion = mkEnableOption (mdDoc "fuzzy Completion with skim"); 9 + fuzzyCompletion = mkEnableOption (mdDoc "fuzzy completion with skim"); 10 10 keybindings = mkEnableOption (mdDoc "skim keybindings"); 11 11 package = mkPackageOption pkgs "skim" {}; 12 12 }; ··· 25 25 source ${cfg.package}/share/skim/completion.zsh 26 26 '' + optionalString cfg.keybindings '' 27 27 source ${cfg.package}/share/skim/key-bindings.zsh 28 + ''; 29 + 30 + programs.fish.interactiveShellInit = optionalString cfg.keybindings '' 31 + source ${cfg.package}/share/skim/key-bindings.fish && skim_key_bindings 28 32 ''; 29 33 }; 30 34 }
+1 -3
pkgs/tools/misc/skim/default.nix
··· 30 30 install -D -m 444 plugin/skim.vim -t $vim/plugin 31 31 32 32 install -D -m 444 shell/* -t $out/share/skim 33 - install -D shell/key-bindings.fish $out/share/fish/vendor_functions.d/sk_key_bindings.fish 34 - mkdir -p $out/share/fish/vendor_conf.d 35 - echo sk_key_bindings > $out/share/fish/vendor_conf.d/load-sk-key-bindings.fish 33 + 36 34 installManPage man/man1/* 37 35 38 36 cat <<SCRIPT > $out/bin/sk-share