diff --git a/autoload/promptline/slices/vcs_branch.vim b/autoload/promptline/slices/vcs_branch.vim index 0c67fe7..b270be5 100644 --- a/autoload/promptline/slices/vcs_branch.vim +++ b/autoload/promptline/slices/vcs_branch.vim @@ -15,8 +15,7 @@ fun! promptline#slices#vcs_branch#function_body(options) \'', \' # git', \' if hash git 2>/dev/null; then', - \' if branch=$( { git symbolic-ref --quiet HEAD || git rev-parse --short HEAD; } 2>/dev/null ); then', - \' branch=${branch##*/}', + \' if branch=$( { git symbolic-ref --quiet --short HEAD || git describe --tags --exact-match || git rev-parse --short HEAD; } 2>/dev/null ); then', \' printf "%s" "${branch_symbol}${branch:-unknown}"', \' return', \' fi',