zsh-workers
 help / color / mirror / code / Atom feed
* more _git improvements?
@ 2007-12-02  7:48 Wayne Davison
  2007-12-03  2:39 ` Clint Adams
  2007-12-03  8:33 ` Nikolai Weibull
  0 siblings, 2 replies; 3+ messages in thread
From: Wayne Davison @ 2007-12-02  7:48 UTC (permalink / raw)
  To: zsh-workers

I was looking at the git alias support in the current _git completion,
and it appears to only be used to list alias words when completing a
subcommand, but has no effect when completing options after an alias.
For instance, I have a git for b=branch in my .gitconfig file, and if I
press TAB after "git b" it is listed as an alias.  However if I type an
extra space and a dash before pressing TAB ("git b -"), I don't get any
completions.  Can the completion system substitute the alias text and
show me the completions for "git branch -" (presumably without actually
changing the "b" into "branch" on the command-line)?

One other thing I noticed is that the "config" subcommand appears twice:
once in useful_commands, and once in ancillary_commands.  This results
in some completing confusion when completing "conf".  I chose to just
dump one of them (I dumped the "useful" one), and that makes it work
better in my limited testing (but I'm not sure it's right).

Finally, if someone checks in some changes, there is a "thee" that
should be "the" in the "gc" command:

    'gc:cleanup unnecessary files and optimize thee local repository'

I could check-in a fix for that, but I figure it can wait for a more
substantial change (if one is coming).

..wayne..


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: more _git improvements?
  2007-12-02  7:48 more _git improvements? Wayne Davison
@ 2007-12-03  2:39 ` Clint Adams
  2007-12-03  8:33 ` Nikolai Weibull
  1 sibling, 0 replies; 3+ messages in thread
From: Clint Adams @ 2007-12-03  2:39 UTC (permalink / raw)
  To: Wayne Davison; +Cc: zsh-workers

On Sat, Dec 01, 2007 at 11:48:03PM -0800, Wayne Davison wrote:
> I was looking at the git alias support in the current _git completion,
> and it appears to only be used to list alias words when completing a
> subcommand, but has no effect when completing options after an alias.
> For instance, I have a git for b=branch in my .gitconfig file, and if I
> press TAB after "git b" it is listed as an alias.  However if I type an
> extra space and a dash before pressing TAB ("git b -"), I don't get any
> completions.  Can the completion system substitute the alias text and
> show me the completions for "git branch -" (presumably without actually
> changing the "b" into "branch" on the command-line)?

We need some layer of indirection down at the bottom where $words[1] is
being used.  I think it's a smidge more complicated than just doing a
simple replacement since aliases may expand to multiple words.

> One other thing I noticed is that the "config" subcommand appears twice:
> once in useful_commands, and once in ancillary_commands.  This results
> in some completing confusion when completing "conf".  I chose to just
> dump one of them (I dumped the "useful" one), and that makes it work
> better in my limited testing (but I'm not sure it's right).
> 
> Finally, if someone checks in some changes, there is a "thee" that
> should be "the" in the "gc" command:
> 
>     'gc:cleanup unnecessary files and optimize thee local repository'
> 
> I could check-in a fix for that, but I figure it can wait for a more
> substantial change (if one is coming).

I'd rather not wait to fix things, what with 4.3.5 being imminent and
all.

Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.52
diff -u -r1.52 _git
--- Completion/Unix/Command/_git	22 Nov 2007 19:09:28 -0000	1.52
+++ Completion/Unix/Command/_git	3 Dec 2007 02:03:48 -0000
@@ -150,7 +150,7 @@
     'commit:record changes to the repository'
     'diff:show changes between commits, commit and working tree, etc.'
     'fetch:download objects and a head from another repository'
-    'gc:cleanup unnecessary files and optimize thee local repository'
+    'gc:cleanup unnecessary files and optimize the local repository'
     'grep:print lines matching a pattern'
     'init:create empty git object database'
     'log:show commit logs'
@@ -238,7 +238,6 @@
   useful_commands=(
     'format-patch:prepare patches for e-mail submission'
     'ls-files:information about files in the index/working directory'
-    'config:get and set options in "$GIT_DIR/config"'
     'instaweb:instantly browse your working repository in gitweb'
     'remote:manage set of tracked repositories'
     'send-email:send patch-e-mails out of "format-patch" output'


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: more _git improvements?
  2007-12-02  7:48 more _git improvements? Wayne Davison
  2007-12-03  2:39 ` Clint Adams
@ 2007-12-03  8:33 ` Nikolai Weibull
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolai Weibull @ 2007-12-03  8:33 UTC (permalink / raw)
  To: Wayne Davison; +Cc: zsh-workers

On Dec 2, 2007 8:48 AM, Wayne Davison <wayned@users.sourceforge.net> wrote:

> Finally, if someone checks in some changes, there is a "thee" that
> should be "the" in the "gc" command:
>
>     'gc:cleanup unnecessary files and optimize thee local repository'

More a question of grammar.  It should be

    'gc:cleanup unnecessary files and optimize thy local repository'

;-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-03  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-02  7:48 more _git improvements? Wayne Davison
2007-12-03  2:39 ` Clint Adams
2007-12-03  8:33 ` Nikolai Weibull

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).