Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#603503: numerous infelicities in git completion
- X-seq: zsh-workers 28411
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug#603503: numerous infelicities in git completion
- Date: Sun, 14 Nov 2010 19:43:48 +0000
- Cc: Joey Hess <joeyh@xxxxxxxxxx>, 603503@xxxxxxxxxxxxxxx
- In-reply-to: <20101113170009.GA25537@xxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20101113170009.GA25537@xxxxxxxxxxxxxxx>
On Sat, Nov 13, 2010 at 01:00:09PM -0400, Joey Hess wrote:
> 1. git log completes only branches, but not filenames. I try to do
> `git log Foo/Bar<tab>` all the time.
> 2. git diff ditto
> 3. git anne<tab> doesn't complete git annex, despite git-annex
> being in path and that being a valid subcommand here.
> 4. git annex add <tab> doesn't complete anything. I think that if zsh is
> unfamiliar with the parameters taken by a subcommand, it should
> complete filenames.
I'm going to punt on #1 and #2 due to lack of time. Until git gets
a convenient way of outputting all the commands and descriptions
I think we're stuck hardcoding them. I'm adding annex and submodule
(it was claimed that someone is working on submodule completion now).
I don't know where annex belongs. Hopefully someone will move it
and write completion for it.
As for #4 I agree.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.131
diff -u -r1.131 _git
--- Completion/Unix/Command/_git 24 Jul 2010 19:01:23 -0000 1.131
+++ Completion/Unix/Command/_git 14 Nov 2010 19:22:40 -0000
@@ -205,6 +205,7 @@
'stage:add file contents to the staging area'
'stash:stash away changes to the working tree'
'status:show working-tree'\''s status'
+ 'submodule:initialize or update or inspect submodules'
'tag:create tag object signed with GPG'
'verify-tag:check GPG signature of a tag')
@@ -290,7 +291,8 @@
'cvsimport:import a CVS "repository" into a git repository'
'svnimport:import SVN repository into git'
'quiltimport:apply a quilt patchset'
- 'svn:bidirectional operation between a single Subversion branch and git')
+ 'svn:bidirectional operation between a single Subversion branch and git'
+ 'annex:manage files without tracking content')
local -a ancillary_commands
ancillary_commands=(
@@ -4493,7 +4495,11 @@
__git_aliases_and_commands
else
curcontext="${curcontext%:*:*}:git-$words[1]:"
- _call_function ret _git-$words[1]
+ if (( $+functions[_git-$words[1]] )); then
+ _call_function ret _git-$words[1]
+ else
+ _files
+ fi
return ret
fi
;;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author