Add - and _ to possible branch names in prompt

This commit is contained in:
Talia 2018-12-09 13:52:47 +01:00
parent 5f1860089e
commit 56b53ce265
1 changed files with 1 additions and 1 deletions

2
bashrc
View File

@ -31,7 +31,7 @@ git__prompt () {
if [ $? = 0 ]
then
status=`git status --short 2>/dev/null`
branch=`git branch | grep -Po '(?<=\* )[[:alnum:]]*'`
branch=`git branch | grep -Po '(?<=\* )[[:alnum:]_-]*'`
modif=`echo "$status" | grep -Po '^\s*M' | wc -l`
untracked=`echo "$status" | grep -Po '^\?\?' | wc -l`
added=`echo "$status" | grep -Po '^\s*[A]' | wc -l`