diff --git a/PS1 b/PS1 index ee16c81..c79e8b7 100644 --- a/PS1 +++ b/PS1 @@ -1,7 +1,7 @@ # /etc/profile.d/PS1.sh: executed by Bourne-compatible login shells. parse_git_branch() { - local LBRANCH="$(git branch 2>/dev/null | sed -ne 's/* \(.*\)/ \1/p'|sed -e 's/^[[:blank:]]*//;s/[[:blank:]]*$//')" + local LBRANCH="$(git branch 2>/dev/null | sed -ne 's/* \(.*\)/ \1/p'|sed -e 's/^[[:blank:]]*//;s/[[:blank:]]*$//'|tr -s '()')" local RBRANCH="$( git rev-parse --symbolic-full-name --abbrev-ref @{u} 2>/dev/null |sed -e 's/^[[:blank:]]*//' )" [ -z "${RBRANCH-x}" ] && unset RBRANCH local BRANCH="${LBRANCH}${RBRANCH+ -> }${RBRANCH}"