zsh-workers
 help / Atom feed
* [PATCH] Completion: Always offer -F/-m for `git tag`
@ 2019-01-04 20:55 dana
  0 siblings, 0 replies; 1+ messages in thread
From: dana @ 2019-01-04 20:55 UTC (permalink / raw)
  To: Zsh workers

Another thing i noticed whilst following the release instructions, thought i
might as well fix it before going on:

_git-tag doesn't offer -F/-m unless -a/-s/-u are already provided, but this
isn't necessary or helpful; the man page for `git tag` says that -F/-m without
-a/-s/-u implies -a.

dana


diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 093464625..0ebbbe861 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2017,15 +2017,6 @@ _git-subtree () {
 
 (( $+functions[_git-tag] )) ||
 _git-tag () {
-  local -a message_opts
-
-  if (( words[(I)-[asu]] )); then
-    message_opts=(
-      '(-m --message -F --file)'{-m+,--message=}'[specify tag message]:message'
-      '(-m --message -F --file)'{-F+,--file=}'[read tag message from given file]:message file:_files'
-    )
-  fi
-
   _arguments \
     - creation \
       '(-a --annotate -s --sign -u --local-user)'{-a,--annotate}'[create an unsigned, annotated tag]' \
@@ -2035,7 +2026,8 @@ _git-tag () {
       '(-f --force)'{-f,--force}'[replace existing tag]' \
       '--create-reflog[create a reflog]' \
       '--cleanup=[cleanup message]:mode:((verbatim\:"no cleanup" whitespace\:"remove leading and trailing whitespace" strip\:"remove leading and trailing whitespace and comments"))' \
-      $message_opts \
+      '(-m --message -F --file)'{-F+,--file=}'[read tag message from given file]:message file:_files' \
+      '(-m --message -F --file)'{-m+,--message=}'[specify tag message]:message' \
       ': :__git_tags' \
       ':: :__git_commits' \
     - deletion \


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 20:55 [PATCH] Completion: Always offer -F/-m for `git tag` dana

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox