1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-30 02:07:28 +02:00

fzf: add enableZshIntegration option

When enabled this will extend user's `$HOME/.zshrc` with sourcing of fzf's
completion and key-bindings integration libraries.

(cherry picked from commit f8398339a3)
This commit is contained in:
Gleb Peregud 2018-03-12 23:29:46 +01:00 committed by Robert Helgesson
parent 5db56a320c
commit eda46344a0
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -55,6 +55,14 @@ in
Whether to enable Bash integration. Whether to enable Bash integration.
''; '';
}; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -74,5 +82,10 @@ in
. ${pkgs.fzf}/share/fzf/completion.bash . ${pkgs.fzf}/share/fzf/completion.bash
. ${pkgs.fzf}/share/fzf/key-bindings.bash . ${pkgs.fzf}/share/fzf/key-bindings.bash
''; '';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
. ${pkgs.fzf}/share/fzf/completion.zsh
. ${pkgs.fzf}/share/fzf/key-bindings.zsh
'';
}; };
} }