Merge pull request #311 from zztalker/patch-1

show git tags if any
pull/359/head
Justin Hileman 2 months ago committed by GitHub
commit f5ba0ce022
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -44,6 +44,9 @@ function __bobthefish_escape_regex -a str -d 'A backwards-compatible `string esc
end
function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)'
set -l tag (command git describe --tags --exact-match 2>/dev/null)
and echo "$tag_glyph $tag "
set -l branch (command git symbolic-ref HEAD 2>/dev/null | string replace -r '^refs/heads/' '')
and begin
[ -n "$theme_git_default_branches" ]
@ -63,10 +66,6 @@ function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish
and return
end
set -l tag (command git describe --tags --exact-match 2>/dev/null)
and echo "$tag_glyph $tag"
and return
set -l branch (command git show-ref --head -s --abbrev | head -n1 2>/dev/null)
echo "$detached_glyph $branch"
end

Loading…
Cancel
Save