mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 09:09:45 +01:00
bash: fix bashrcExtra
interactive shell test
To determine if bash is running interactively test whether "$-"
contains "i".
See: https://www.gnu.org/software/bash/manual/html_node/Is-this-Shell-Interactive_003f.html
(cherry picked from commit a1a7e7cd24
)
This commit is contained in:
parent
091f52197d
commit
d268605244
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ in
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
programs.bash.bashrcExtra = ''
|
programs.bash.bashrcExtra = ''
|
||||||
# Commands that should be applied only for interactive shells.
|
# Commands that should be applied only for interactive shells.
|
||||||
if [[ -n $PS1 ]]; then
|
if [[ $- == *i* ]]; then
|
||||||
${historyControlStr}
|
${historyControlStr}
|
||||||
|
|
||||||
${shoptsStr}
|
${shoptsStr}
|
||||||
|
|
Loading…
Reference in a new issue