Fix bash git prompt branch names

This commit is contained in:
Talia 2020-01-07 19:21:11 +01:00
parent a1a5a8b2f1
commit 3e6635e3ba

2
bashrc
View file

@ -52,7 +52,7 @@ git__prompt () {
fi fi
echo -ne ' \033[00;33mδ' echo -ne ' \033[00;33mδ'
status=`git status --short 2>/dev/null` 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` modif=`echo "$status" | grep -Po '^\s*M' | wc -l`
untracked=`echo "$status" | grep -Po '^\?\?' | wc -l` untracked=`echo "$status" | grep -Po '^\?\?' | wc -l`
added=`echo "$status" | grep -Po '^\s*[A]' | wc -l` added=`echo "$status" | grep -Po '^\s*[A]' | wc -l`