Download:
child 29:0fcd48b30d83
parent 27:b124c75961d1
28:dda34692ae7d
Anton Shestakov <engored@ya.ru>, Thu, 03 Apr 2014 01:09:45 +0900
Update git prompt.

1 файлов изменено, 4 вставок(+), 4 удалений(-) [+]
.bash_prompt file | annotate | diff | comparison | revisions
--- a/.bash_prompt Thu Feb 27 20:01:56 2014 +0900
+++ b/.bash_prompt Thu Apr 03 01:09:45 2014 +0900
@@ -39,15 +39,15 @@
fi
if [[ "$GIT_TRACKED" ]] ; then
local GIT_STATUS=$(git status 2>/dev/null)
- local GIT_BRANCH=$(grep '# On branch' <<< "$GIT_STATUS" | cut -d' ' -f4-)
+ local GIT_BRANCH=$(grep 'On branch' <<< "$GIT_STATUS" | cut -d' ' -f3-)
- if [[ $(grep "# Your branch is behind" <<< "$GIT_STATUS") ]]; then
+ if [[ $(grep "Your branch is behind" <<< "$GIT_STATUS") ]]; then
local GIT_UPDATE="$R^"
fi
- if [[ $(grep "# Changes to be committed:" <<< "$GIT_STATUS") ]]; then
+ if [[ $(grep "Changes to be committed" <<< "$GIT_STATUS") ]]; then
local GIT_STAGED="$R!"
fi
- if [[ $(grep "# Changes not staged for commit:" <<< "$GIT_STATUS") ]]; then
+ if [[ $(grep "Changes not staged" <<< "$GIT_STATUS") ]]; then
local GIT_UNSTAGED="$P?"
fi