add remote-branch to prompt

This commit is contained in:
Jakobus Schürz 2020-07-09 23:43:13 +02:00
parent 23105d4f20
commit bb27f2e3d0

5
PS1
View file

@ -2,8 +2,9 @@
parse_git_branch() {
git branch 2>/dev/null | sed -ne 's/* \(.*\)/ (\1)/p'
#git symbolic-ref --short HEAD 2> /dev/null | sed -ne 's/\(.*\)/ (\1)/p'
local BRANCH=$(git branch 2>/dev/null | sed -ne 's/* \(.*\)/ (\1/p')
BRANCH="$BRANCH -> $( git rev-parse --symbolic-full-name --abbrev-ref @{u}) )"
echo $BRANCH
}
set_label() {