mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2025-06-13 13:03:54 +00:00
Improved getting latest tag
This commit is contained in:
parent
6ffbce0f48
commit
4044c8515a
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)'
|
function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)'
|
||||||
if [ "$theme_display_git_latest_tag" = 'yes' ]
|
if [ "$theme_display_git_latest_tag" = 'yes' ]
|
||||||
set -l latest_tag_value (command git for-each-ref --sort committerdate --format '%(refname)' refs/tags | sed s#refs/tags/## | tr -d ' ' | tail -1)
|
set -l latest_tag_value (command git describe --abbrev=0 --tags 2> /dev/null)
|
||||||
if [ "$latest_tag_value" != '' ]
|
if [ "$latest_tag_value" != '' ]
|
||||||
set latest_tag " $__bobthefish_latest_tag_glyph$latest_tag_value"
|
set latest_tag " $__bobthefish_latest_tag_glyph$latest_tag_value"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user