really fix PS1 uniq paranthesis

This commit is contained in:
Jakobus Schürz 2020-07-14 08:25:20 +02:00
parent 1295ed60cf
commit 8cf3142751

2
PS1
View file

@ -5,7 +5,7 @@ parse_git_branch() {
local RBRANCH="$( git rev-parse --symbolic-full-name --abbrev-ref @{u} 2>/dev/null |sed -e 's/^[[:blank:]]*//' )" local RBRANCH="$( git rev-parse --symbolic-full-name --abbrev-ref @{u} 2>/dev/null |sed -e 's/^[[:blank:]]*//' )"
[ -z "${RBRANCH-x}" ] && unset RBRANCH [ -z "${RBRANCH-x}" ] && unset RBRANCH
local BRANCH="${LBRANCH}${RBRANCH+ -> }${RBRANCH}" local BRANCH="${LBRANCH}${RBRANCH+ -> }${RBRANCH}"
[ -z "${BRANCH-x}" ] || echo "($BRANCH)|tr -s '()'" [ -z "${BRANCH-x}" ] || echo "($BRANCH)"|tr -s '()'
} }
set_label() { set_label() {