zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <danielsh@apache.org>
To: zsh-workers@zsh.org
Subject: [PATCH 3/3] _git: Complete --contains after -r (--remotes).
Date: Sun, 12 Jan 2020 22:29:28 +0000	[thread overview]
Message-ID: <20200112222928.25546-3-danielsh@apache.org> (raw)
In-Reply-To: <20200112222928.25546-1-danielsh@apache.org>

---
This one I'm not so sure about.  I wanted to make «git branch -r --cont<TAB>»
complete the option name and arguments to it, and that part works, but
the way in which those single-letter variable names are used in the
_arguments specs is pretty undecipherable.  Does this patch seem
obviously right, or obviously wrong, to anyone?  If not, I'll test it
for a while and commit it to the 5.9 branch if I don't find any obvious
showstopper.  (But I don't use «git branch» that frequently, so perhaps
it'll be better if I committed this to 5.9 directly…?)

Cheers,

Daniel

 Completion/Unix/Command/_git | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 8e0d57789..d503b1134 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -282,9 +282,13 @@ _git-bisect () {
 _git-branch () {
   declare l c m d e
 
+  # listing branches
-  l='--color --no-color -r --remotes -a -v --verbose --abbrev --no-abbrev -l --list --points-at --sort'
+  l='--color --no-color -r --remotes -a -v --verbose --abbrev --no-abbrev -l --list --points-at --sort --contains --no-contains'
+  # creating branches
-  c='--create-reflog -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --contains --no-contains --merged --no-merged'
+  c='--create-reflog -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --merged --no-merged'
+  # modifying branches
   m='-c --copy -C -m --move -M --edit-description --show-current'
+  # deleting branches
   d='-d --delete -D'
 
   declare -a dependent_creation_args

      parent reply	other threads:[~2020-01-12 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-12 22:29 [PATCH 1/3] zshexpn: Describe parameter elision and add some introductory prose Daniel Shahaf
2020-01-12 22:29 ` [PATCH 2/3] _git: Complete bisect/new as well as bisect/bad Daniel Shahaf
2020-01-12 22:29 ` Daniel Shahaf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200112222928.25546-3-danielsh@apache.org \
    --to=danielsh@apache.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).