Browse Source

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.
Asatur Meltonyan 6 years ago
parent
commit
046d49f782
1 changed files with 1 additions and 0 deletions
  1. 1 0
      plugins/git/git.plugin.zsh

+ 1 - 0
plugins/git/git.plugin.zsh

@@ -251,6 +251,7 @@ alias gsu='git submodule update'
 
 
 alias gts='git tag -s'
 alias gts='git tag -s'
 alias gtv='git tag | sort -V'
 alias gtv='git tag | sort -V'
+alias gtl='gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl'
 
 
 alias gunignore='git update-index --no-assume-unchanged'
 alias gunignore='git update-index --no-assume-unchanged'
 alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
 alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'