fzf: support fish integration
Create the `enableFishIntegration` option to install the fzf key-bindings for people who use fish shell. PR #1074
This commit is contained in:
parent
faa2945606
commit
71c7aaee83
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue