diff --git a/modules/programs/fzf.nix b/modules/programs/fzf.nix index 7279d903..832c0bfa 100644 --- a/modules/programs/fzf.nix +++ b/modules/programs/fzf.nix @@ -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 ''; }; }