1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00

fzf: only enable when line editing is available

Fixes #401

Suggested-by: Alex Vorobiev
Suggested-by: Mario Rodas
This commit is contained in:
Robert Helgesson 2018-10-30 00:09:20 +01:00
parent 0435d9c338
commit 8d4c65f259
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -122,13 +122,17 @@ in
);
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
. ${pkgs.fzf}/share/fzf/completion.bash
. ${pkgs.fzf}/share/fzf/key-bindings.bash
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
. ${pkgs.fzf}/share/fzf/completion.bash
. ${pkgs.fzf}/share/fzf/key-bindings.bash
fi
'';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
. ${pkgs.fzf}/share/fzf/completion.zsh
. ${pkgs.fzf}/share/fzf/key-bindings.zsh
if [[ $options[zle] = on ]]; then
. ${pkgs.fzf}/share/fzf/completion.zsh
. ${pkgs.fzf}/share/fzf/key-bindings.zsh
fi
'';
};
}