added support for git tags
This commit is contained in:
@@ -83,8 +83,7 @@ function git_prompt_vars {
|
||||
fi
|
||||
SCM_PREFIX=${GIT_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}
|
||||
SCM_SUFFIX=${GIT_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}
|
||||
local ref=$(git symbolic-ref HEAD 2> /dev/null)
|
||||
SCM_BRANCH=${ref#refs/heads/}
|
||||
SCM_BRANCH=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match 2> /dev/null)
|
||||
SCM_CHANGE=$(git rev-parse HEAD 2>/dev/null)
|
||||
local ahead_re='.+ahead ([0-9]+).+'
|
||||
local behind_re='.+behind ([0-9]+).+'
|
||||
|
||||
Reference in New Issue
Block a user