add remote-branch to prompt
This commit is contained in:
parent
23105d4f20
commit
bb27f2e3d0
1 changed files with 3 additions and 2 deletions
5
PS1
5
PS1
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
parse_git_branch() {
|
parse_git_branch() {
|
||||||
|
|
||||||
git branch 2>/dev/null | sed -ne 's/* \(.*\)/ (\1)/p'
|
local BRANCH=$(git branch 2>/dev/null | sed -ne 's/* \(.*\)/ (\1/p')
|
||||||
#git symbolic-ref --short HEAD 2> /dev/null | sed -ne 's/\(.*\)/ (\1)/p'
|
BRANCH="$BRANCH -> $( git rev-parse --symbolic-full-name --abbrev-ref @{u}) )"
|
||||||
|
echo $BRANCH
|
||||||
}
|
}
|
||||||
|
|
||||||
set_label() {
|
set_label() {
|
||||||
|
|
Loading…
Reference in a new issue