diff options
-rw-r--r-- | bash-git-prompt | 2 |
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 |