#3 Fix displaying branch names with numbers, hyphens and underscores

Merged
demure merged 1 commits from tukusejssirs/git_branch_name into demure/master 5 years ago
1 changed files with 2 additions and 2 deletions
  1. 2 2
      subbash/prompt

+ 2 - 2
subbash/prompt

@@ -124,7 +124,7 @@ function __prompt_command() {
                 ### End Test Changes ### }}}
 
                 ### Find Branch ### {{{
-                local GBra="$(echo ${GStat} | tr ':' '\n' | grep "^##" | cut -c4- | grep -o "^[a-zA-Z]\{1,\}[^\.]")"
+                local GBra="$(echo ${GStat} | tr ':' '\n' | grep "^##" | cut -c4- | grep -o "^[a-zA-Z0-9_-]\{1,\}[^\.]")"
                 if [ "$GBra" ]; then
                     if [ "$GBra" == "master" ]; then
                         local GBra="M"      ## Because why waste space
@@ -170,4 +170,4 @@ function __prompt_command() {
         PS1+=" ${PSCol}-> ${RCol}"          ## End of PS1
     fi
 }
-### End PS1 ### }}}
+### End PS1 ### }}}