Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#428705: git reset HEAD completion not working
- X-seq: zsh-workers 23557
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: martin f krafft <madduck@xxxxxxxxxx>, 428705@xxxxxxxxxxxxxxx
- Subject: Re: Bug#428705: git reset HEAD completion not working
- Date: Wed, 13 Jun 2007 12:37:30 -0400
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20070613161523.GB30307@xxxxxxxxxxxxxxxxx>
- Mail-followup-to: martin f krafft <madduck@xxxxxxxxxx>, 428705@xxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20070613161523.GB30307@xxxxxxxxxxxxxxxxx>
On Wed, Jun 13, 2007 at 05:15:23PM +0100, martin f krafft wrote:
> git reset HEAD Co<tab>
>
> does not complete. It should probably get its data from the git
> status output:
>
> # On branch master
> # Changes to be committed:
> # (use "git reset HEAD <file>..." to unstage)
> #
> # new file: src/ConfigBroker.py
> #
>
> Alternatively, normal file completion would work, might even be better.
Probably __git_revisions should complete HEAD and HEAD^, though I don't
know what that is.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.2
diff -u -r1.2 _git
--- Completion/Unix/Command/_git 25 Nov 2005 12:52:23 -0000 1.2
+++ Completion/Unix/Command/_git 13 Jun 2007 16:35:30 -0000
@@ -865,7 +865,8 @@
'( --soft --hard)--mixed[like --soft but report what has not been updated (default)]' \
'(--mixed --hard)--soft[do not touch the index file nor the working tree]' \
'(--mixed --soft )--hard[match the working tree and index to the given tree]' \
- ':commit-ish:__git_revisions' && ret=0
+ ':commit-ish:__git_revisions' \
+ '*:path:_files' && ret=0
}
_git-resolve () {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author