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 ''
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 ''
if [[ $options[zle] = on ]]; then
. ${pkgs.fzf}/share/fzf/completion.zsh
. ${pkgs.fzf}/share/fzf/key-bindings.zsh
fi
'';
};
}