diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index d8359c12f..14a158a24 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -155,7 +155,7 @@ in in mkIf cfg.enable { programs.bash.bashrcExtra = '' # Commands that should be applied only for interactive shells. - if [[ -n $PS1 ]]; then + if [[ $- == *i* ]]; then ${historyControlStr} ${shoptsStr}