bashrc: move call for $nixos_needsreboot into `PS0` to prevent setting `$?` to `0`
This commit is contained in:
parent
5f34a07801
commit
9aa74c53f1
7
.bashrc
7
.bashrc
|
@ -219,8 +219,11 @@ function nixos_needsreboot() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# PS1 setup
|
# PS1 setup
|
||||||
PS0="\t\n" # display time in HH:MM:SS format
|
PS0="\t" # display time in HH:MM:SS format
|
||||||
PS1='$(nixos_needsreboot)'"\n[\u@\h:\$PWD \$?]\$ "
|
# the function needs to be called **everytime** and is in single quotes
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
PS0+='$(nixos_needsreboot)'"\n"
|
||||||
|
PS1="\n[\u@\h:\$PWD \$?]\$ "
|
||||||
export PS0 PS1
|
export PS0 PS1
|
||||||
|
|
||||||
# zoxide setup
|
# zoxide setup
|
||||||
|
|
Loading…
Reference in New Issue