From 71c7aaee835e6fe2d67e53dd63d1cda52079e491 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 6 Mar 2020 11:28:13 +0000 Subject: [PATCH] fzf: support fish integration Create the `enableFishIntegration` option to install the fzf key-bindings for people who use fish shell. PR #1074 --- modules/programs/fzf.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/programs/fzf.nix b/modules/programs/fzf.nix index 36eb3a1c..3aee5776 100644 --- a/modules/programs/fzf.nix +++ b/modules/programs/fzf.nix @@ -100,6 +100,14 @@ in { Whether to enable Zsh integration. ''; }; + + enableFishIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Fish integration. + ''; + }; }; config = mkIf cfg.enable { @@ -130,5 +138,9 @@ in { . ${pkgs.fzf}/share/fzf/key-bindings.zsh fi ''; + + programs.fish.shellInit = mkIf cfg.enableFishIntegration '' + source ${pkgs.fzf}/share/fzf/key-bindings.fish && fzf_key_bindings + ''; }; }