From: Nicolas Boisselier Date: Sun, 4 Feb 2018 04:43:30 +0000 (+0000) Subject: etc/profile.d/ps1.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=31c2d7c3b292f699e3f63572cb9db6f6cdf2d9f8;p=nb.git etc/profile.d/ps1.sh --- diff --git a/etc/profile.d/ps1.sh b/etc/profile.d/ps1.sh index 6a7ef6ec..5fc9390e 100644 --- a/etc/profile.d/ps1.sh +++ b/etc/profile.d/ps1.sh @@ -1,9 +1,8 @@ # # PS1 # -if is_prompt 2>/dev/null; then +[ "${BASH-no}" != "no" ] || return 0 +is_prompt 2>/dev/null || return 0 - PS1="\u@\h:\W${char}" - [ $UID = "0" ] && PS1="$PS1# " || PS1="$PS1\$ " - -fi +PS1="\u@\h:\W${char}" +[ $UID = "0" ] && PS1="$PS1# " || PS1="$PS1\$ "