diff --git a/bash_gitprompt b/bash_gitprompt index 69de7fe5..aada5431 100644 --- a/bash_gitprompt +++ b/bash_gitprompt @@ -17,7 +17,7 @@ function parse_git_branch { git rev-parse --git-dir &> /dev/null git_status="$(git status 2> /dev/null)" branch_pattern="^# On branch ([^${IFS}]*)" - remote_pattern="# Your branch is (.*) of" + remote_pattern="# Your branch is (.*) '" diverge_pattern="# Your branch and (.*) have diverged" if [[ ! ${git_status}} =~ "working directory clean" ]]; then @@ -25,7 +25,7 @@ function parse_git_branch { fi # add an else if or two here if you want to get more specific if [[ ${git_status} =~ ${remote_pattern} ]]; then - if [[ ${BASH_REMATCH[1]} == "ahead" ]]; then + if [[ ${BASH_REMATCH[1]} == "ahead of" ]]; then remote="${YELLOW}↑" else remote="${YELLOW}↓"