zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: Bug in completion for git merge
Date: Mon, 15 Feb 2016 22:02:24 -0500	[thread overview]
Message-ID: <56C29140.304@gmx.com> (raw)
In-Reply-To: <8D34A413-897D-4D27-8FD4-4958FC0A90C4@gmail.com>

On 02/15/2016 12:20 PM, Thomas Becker wrote:
> Ahh sorry about that.  That explains some of the other weirdness I’ve been seeing. I’m trying to upgrade my completion to something that knows about newer git options than what is provided in 5.0.5. Is there any way to do that? Thanks.
> 
By patching the completer to use portable syntax, portable in terms of zsh.
The following patch applied to master should work in pre 5.1.

Considering that this is the only line in _git that expects the reserved word behavior,
it may be a good idea to commit it for consistency sake. But bart has a point.

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b7eaf2e..fb10fa6 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1129,9 +1129,9 @@ _git-log () {

 (( $+functions[_git-merge] )) ||
 _git-merge () {
-  local -a merge_options
+  local -a merge_options git_commit_opts
   __git_setup_merge_options
-  local -a git_commit_opts=(--all --not HEAD --not)
+  git_commit_opts=(--all --not HEAD --not)

   _arguments -w -S -s \
     $merge_options \


  reply	other threads:[~2016-02-16  3:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 15:41 Thomas Becker
2016-02-15 16:58 ` Bart Schaefer
2016-02-15 17:20   ` Thomas Becker
2016-02-16  3:02     ` Eric Cook [this message]
2016-02-16 10:49       ` Daniel Shahaf
2016-02-16 14:08         ` Eric Cook
2016-02-16 10:49     ` Daniel Shahaf

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=56C29140.304@gmx.com \
    --to=llua@gmx.com \
    --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).