Download:
child 40:48d26a4c35ba
parent 38:aeaac3ebe25e
39:06ada8ea9a31
Anton Shestakov <engored@ya.ru>, Wed, 27 Aug 2014 22:21:17 +0900
Behind and ahead of branches in git.

1 файлов изменено, 5 вставок(+), 2 удалений(-) [+]
.bash_prompt file | annotate | diff | comparison | revisions
--- a/.bash_prompt Wed Aug 27 21:54:16 2014 +0900
+++ b/.bash_prompt Wed Aug 27 22:21:17 2014 +0900
@@ -72,7 +72,10 @@
local GIT_REV=$(LC_ALL=C git rev-parse --short HEAD 2>/dev/null)
if [[ $GIT_STATUS == *'Your branch is behind'* ]]; then
- local GIT_UPDATE="$R^"
+ local GIT_BEHIND="$R^"
+ fi
+ if [[ $GIT_STATUS == *'Your branch is ahead'* ]]; then
+ local GIT_AHEAD="$Y^"
fi
if [[ $GIT_STATUS == *'Changes to be committed'* ]]; then
local GIT_STAGED="$R!"
@@ -81,7 +84,7 @@
local GIT_UNSTAGED="$P?"
fi
- local GIT_INFO=" ${G}${GIT_BRANCH}±${GIT_REV}${GIT_STAGED}${GIT_UNSTAGED}${GIT_UPDATE}${RESET}"
+ local GIT_INFO=" ${G}${GIT_BRANCH}±${GIT_REV}${GIT_BEHIND}${GIT_AHEAD}${GIT_STAGED}${GIT_UNSTAGED}${RESET}"
fi
fi