zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Wayne Davison <wayned@users.sourceforge.net>
Cc: zsh-workers@sunsite.dk
Subject: Re: more _git improvements?
Date: Sun, 2 Dec 2007 21:39:34 -0500	[thread overview]
Message-ID: <20071203023934.GA7017@scowler.net> (raw)
In-Reply-To: <20071202074803.GB11034@blorf.net>

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'


  reply	other threads:[~2007-12-03  2:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-02  7:48 Wayne Davison
2007-12-03  2:39 ` Clint Adams [this message]
2007-12-03  8:33 ` Nikolai Weibull

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=20071203023934.GA7017@scowler.net \
    --to=clint@zsh.org \
    --cc=wayned@users.sourceforge.net \
    --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).