summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Blinne <alexander.blinne@uni-jena.de>2016-04-11 22:26:42 +0200
committerAlexander Blinne <alexander.blinne@uni-jena.de>2016-04-11 22:26:42 +0200
commit9cba3ad5c9246b825470378d141e5a83acedfa85 (patch)
tree7cc222cae16f052902a419b1a5eb4063b1756616
parent7872f2cb67c6b4fe5d3ed841891b8371b13649b5 (diff)
downloadbash-git-prompt-9cba3ad5c9246b825470378d141e5a83acedfa85.tar.xz
Branches mit Leerzeichen verstehenv0.2
-rw-r--r--bash-git-prompt2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash-git-prompt b/bash-git-prompt
index 1397a50..0eef652 100644
--- a/bash-git-prompt
+++ b/bash-git-prompt
@@ -15,7 +15,7 @@ else
PS1="$PS1save"
fi
-if branch=$(git branch 2>/dev/null | grep '\*' | cut -d' ' -f2)
+if branch=$(git branch 2>/dev/null | grep '^\*' | sed "s|^\*\s*||")
then
PS1="$PS1 "
git status --porcelain | grep -q "^.\S" && wtClean=false || wtClean=true