Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Add --cached to git-diff completion
- X-seq: zsh-workers 23909
- From: Clint Adams <clint@xxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Add --cached to git-diff completion
- Date: Fri, 5 Oct 2007 21:10:11 -0400
- Cc: zsh-workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <237967ef0710051613y38c38b18p5deee6092378f952@xxxxxxxxxxxxxx>
- Mail-followup-to: Mikael Magnusson <mikachu@xxxxxxxxx>, zsh-workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0710051613y38c38b18p5deee6092378f952@xxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author