Merge pull request #571 from edubxb/fix-git-prompt

Fix grep pattern
pull/573/head
Eduardo Bellido Bellido 2015-09-10 20:08:23 +02:00
commit d1e0735b9a
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ function git_prompt_vars {
local ref=$(git symbolic-ref -q HEAD 2> /dev/null) local ref=$(git symbolic-ref -q HEAD 2> /dev/null)
if [[ -n "$ref" ]]; then if [[ -n "$ref" ]]; then
SCM_BRANCH=${SCM_THEME_BRANCH_PREFIX}${ref#refs/heads/} SCM_BRANCH=${SCM_THEME_BRANCH_PREFIX}${ref#refs/heads/}
local tracking_info="$(grep "${SCM_BRANCH}..." <<< "${status}")" local tracking_info="$(grep "${SCM_BRANCH}\.\.\." <<< "${status}")"
if [[ -n "${tracking_info}" ]]; then if [[ -n "${tracking_info}" ]]; then
[[ "${tracking_info}" =~ .+\[gone\]$ ]] && local branch_gone="true" [[ "${tracking_info}" =~ .+\[gone\]$ ]] && local branch_gone="true"
tracking_info=${tracking_info#\#\# ${SCM_BRANCH}...} tracking_info=${tracking_info#\#\# ${SCM_BRANCH}...}