zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: Add --cached to git-diff completion
Date: Fri, 5 Oct 2007 21:10:11 -0400	[thread overview]
Message-ID: <20071006011011.GB21782@scowler.net> (raw)
In-Reply-To: <237967ef0710051613y38c38b18p5deee6092378f952@mail.gmail.com>

On Sat, Oct 06, 2007 at 01:13:48AM +0200, Mikael Magnusson wrote:
> Not sure how to make _arguments do different things based on options given,for
> git-diff ... -- <tab>

Maybe it'd be worthwhile to make a _git_arguments that understands the
special meaning of -- .

> it should complete files
> and for
> git-diff --cached <tab>
> it should only complete one commit, not two, since we're diffing
> against the index

One thing you could do is change it to defer all non-option arguments to
a state option and add logic to act based on previous words.

> but i think the following change is still better than not. (don't add
> --cached to $diff_args
> since that is also used for git-diff-index and others where the
> description is different).

Committed.


      reply	other threads:[~2007-10-06  1:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 23:13 Mikael Magnusson
2007-10-06  1:10 ` Clint Adams [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=20071006011011.GB21782@scowler.net \
    --to=clint@zsh.org \
    --cc=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).