From 9cba3ad5c9246b825470378d141e5a83acedfa85 Mon Sep 17 00:00:00 2001 From: Alexander Blinne Date: Mon, 11 Apr 2016 22:26:42 +0200 Subject: Branches mit Leerzeichen verstehen --- bash-git-prompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2