Use an if-else check for prompt character
This commit is contained in:
parent
8ac7dd06fe
commit
53bac33b40
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ PS1="$ "
|
||||||
if /bin/test -z "${HOST}"; then
|
if /bin/test -z "${HOST}"; then
|
||||||
HOST="$(hostname)"
|
HOST="$(hostname)"
|
||||||
fi
|
fi
|
||||||
export PS1="${HOST%%.*}$PS1"
|
if /bin/test $(id -u) -eq 0; then
|
||||||
|
export PS1="${HOST%%.*}# "
|
||||||
|
else
|
||||||
|
export PS1="${HOST%%.*}$ "
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$BASH" ]; then
|
if [ "$BASH" ]; then
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
|
|
Loading…
Reference in a new issue