Skip to content

Commit

Permalink
fzf: support fish integration
Browse files Browse the repository at this point in the history
Create the `enableFishIntegration` option to install the fzf
key-bindings for people who use fish shell.

PR nix-community#1074
  • Loading branch information
wpcarro authored and jorsn committed Apr 25, 2020
1 parent 4845b63 commit e60752c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/programs/fzf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
'';
};
}

0 comments on commit e60752c

Please sign in to comment.