Merged detached head into master
This commit is contained in:
parent
0a8cffb3b9
commit
2656558774
1 changed files with 4 additions and 4 deletions
8
PS1
8
PS1
|
@ -1,11 +1,11 @@
|
|||
# /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'|tr -d \"[:blank:]\")"
|
||||
local RBRANCH="$( git rev-parse --symbolic-full-name --abbrev-ref @{u} 2>/dev/null |tr -d \"[:blank:]\" )"
|
||||
local LBRANCH="$(git branch 2>/dev/null | sed -ne 's/* \(.*\)/ \1/p'|sed -e 's/^[[:blank:]]*//;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
|
||||
local BRANCH="$LBRANCH ${RBRANCH+->} $RBRANCH"
|
||||
[ -z "${LBRANCH+x}" -o -z "${RBRANCH}" ] || echo "($BRANCH)"
|
||||
local BRANCH="${LBRANCH}${RBRANCH+ -> }${RBRANCH}"
|
||||
[ -z "${LBRANCH+x}" ] || echo "($BRANCH)"
|
||||
}
|
||||
|
||||
set_label() {
|
||||
|
|
Loading…
Reference in a new issue