From 31c2d7c3b292f699e3f63572cb9db6f6cdf2d9f8 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sun, 4 Feb 2018 04:43:30 +0000 Subject: [PATCH] etc/profile.d/ps1.sh --- etc/profile.d/ps1.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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\$ " -- 2.47.3