046d49f7827c994916a55d1531e70564682307af

Author
Asatur Meltonyan <asaturmeltonyan@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

git: add 'gtl' alias to list tags matching a pattern (#7629)

1. List the tags that match the pattern(s) passed through the argument.
2. Displays the first line of the annotation message along with the tag, or the line of the first commit message if the tag is not annotated.
3. Sorts and displays tags in descending order.

Diff

 1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
 2index 5bef95bd5008b90d51f869f624f55028c94781a0..a4b6eb9777e4d150e76cc67079ead4bc6403013c 100644
 3--- a/plugins/git/git.plugin.zsh
 4+++ b/plugins/git/git.plugin.zsh
 5@@ -251,6 +251,7 @@ alias gsu='git submodule update'
 6 
 7 alias gts='git tag -s'
 8 alias gtv='git tag | sort -V'
 9+alias gtl='gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl'
10 
11 alias gunignore='git update-index --no-assume-unchanged'
12 alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'