mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 00:39:45 +01: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.
This commit is contained in:
parent
9bf9e7ac5c
commit
f8398339a3
1 changed files with 13 additions and 0 deletions
|
@ -55,6 +55,14 @@ in
|
|||
Whether to enable Bash integration.
|
||||
'';
|
||||
};
|
||||
|
||||
enableZshIntegration = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Zsh integration.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -74,5 +82,10 @@ in
|
|||
. ${pkgs.fzf}/share/fzf/completion.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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue