From 4044c8515a68938bc9b38f0c482739248293f7ff Mon Sep 17 00:00:00 2001 From: Bernardo Heynemann Date: Fri, 23 Sep 2016 17:06:48 -0300 Subject: [PATCH] Improved getting latest tag --- fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 7b5c6ba..ff01809 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -53,7 +53,7 @@ function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)' 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" != '' ] set latest_tag " $__bobthefish_latest_tag_glyph$latest_tag_value" end