zsh-workers
 help / color / mirror / code / Atom feed
From: "Mikael Magnusson" <mikachu@gmail.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: _git (large)
Date: Tue, 25 Sep 2007 20:44:03 +0200	[thread overview]
Message-ID: <237967ef0709251144t4b553b5dla9ff570de41bbed4@mail.gmail.com> (raw)
In-Reply-To: <20070925175434.GA25244@scowler.net>

On 25/09/2007, Clint Adams <clint@zsh.org> wrote:
> On Tue, Sep 25, 2007 at 07:34:07PM +0200, Mikael Magnusson wrote:
> > When I do git-merge <tab>, I get the following (which I also get when
> > I use _git straight from Nikolai's repo):
> > _arguments:comparguments:303: invalid rest argument definition:
> > *{-s,--strategy=-}[use given merge strategy]:merge
> > strategy:__git_merge_strategies
> > and nothing is completed.
>
> See if this does the right thing.
>
> Index: Completion/Unix/Command/_git

Now it doesn't bomb out, but it does the wrong thing:

% git-merge <tab>
---- merge message

and

% git-merge a <tab>
---- heads
---- tags
dot-zsh-199905041932 etc

merge message is only supposed to be completed after -m.
Additionally,
% git-merge -<tab>
does not offer -m :). (Nor goes git-merge a -<tab>)

Suspect following patch will fix it:

diff --git a/Completion/Unix/Command/_git
b/Completion/Unix/Command/_git
index 62b2361..b89b0c9 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1663,7 +1663,7 @@ _git-ls-remote () {
 _git-merge () {
   _arguments \
     "$merge_args[@]" \
-    ':merge message' \
+    '-m:merge message' \
     '*:remote:__git_commits' && ret=0
 }



-- 
Mikael Magnusson


  reply	other threads:[~2007-09-25 18:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 15:59 Clint Adams
2007-09-25 17:34 ` Mikael Magnusson
2007-09-25 17:54   ` Clint Adams
2007-09-25 18:44     ` Mikael Magnusson [this message]
2007-09-25 19:00       ` Clint Adams
2007-09-26 23:16         ` Mikael Magnusson
2007-09-27 11:25           ` Nikolai Weibull
2007-09-27 11:43             ` Clint Adams
2007-09-27 11:57               ` Nikolai Weibull
2007-09-27 12:34                 ` Clint Adams
2007-09-27 11:32           ` Clint Adams
2007-09-27 11:57             ` Nikolai Weibull
2007-09-27 12:38           ` Clint Adams

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=237967ef0709251144t4b553b5dla9ff570de41bbed4@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /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).