1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

navi: don't install widget on limited terminals

Otherwise we get the following warning for terminals with limited
capabilities:

    bash: bind: warning: line editing not enabled
This commit is contained in:
Mario Rodas 2021-12-11 04:20:00 +00:00 committed by Robert Helgesson
parent 0ebed30a10
commit 543484d298
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -64,11 +64,15 @@ in {
home.packages = [ cfg.package ];
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
eval "$(${cfg.package}/bin/navi widget bash)"
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
eval "$(${cfg.package}/bin/navi widget bash)"
fi
'';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
eval "$(${cfg.package}/bin/navi widget zsh)"
if [[ $options[zle] = on ]]; then
eval "$(${cfg.package}/bin/navi widget zsh)"
fi
'';
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''