summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsatur Meltonyan <asaturmeltonyan@gmail.com>2019-04-07 16:17:22 +0400
committerMarc Cornellà <marc.cornella@live.com>2019-04-07 14:17:22 +0200
commit046d49f7827c994916a55d1531e70564682307af (patch)
tree22fada546a7bf57dd7b5136dc831c4cc00dba12f
parent4ddb2e384ab0840b1d8a6d4c95770ef8a6c25fcc (diff)
downloadzsh-046d49f7827c994916a55d1531e70564682307af.tar.gz
zsh-046d49f7827c994916a55d1531e70564682307af.tar.bz2
zsh-046d49f7827c994916a55d1531e70564682307af.zip
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.
-rw-r--r--plugins/git/git.plugin.zsh1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 5bef95bd5..a4b6eb977 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -251,6 +251,7 @@ alias gsu='git submodule update'
alias gts='git tag -s'
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 gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'