From: Clint Adams <clint@zsh.org>
To: zsh workers <zsh-workers@sunsite.dk>
Subject: Re: PATCH: partly rewriting alias handling in _git
Date: Mon, 1 Sep 2008 19:22:26 +0000 [thread overview]
Message-ID: <20080901192226.GA4928@scru.org> (raw)
In-Reply-To: <20080901180642.GE6330@fsst.voodoo.lan>
On Mon, Sep 01, 2008 at 08:06:42PM +0200, Frank Terbeck wrote:
> % git c --some args
> ^- place the cursor here and hit <tab>.
>
> That does not return completions like 'commit'.
Try this.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.96
diff -u -r1.96 _git
--- Completion/Unix/Command/_git 1 Sep 2008 18:49:33 -0000 1.96
+++ Completion/Unix/Command/_git 1 Sep 2008 19:19:59 -0000
@@ -4307,15 +4307,15 @@
'(-p --paginate)'{-p,--paginate}'[pipe output into $PAGER]' \
'--git-dir=-[path to repository]:directory:_directories' \
'--bare[use $PWD as repository]' \
- ':command:->command' \
- '*::options:->options' && ret=0
+ '*::arg:->cmd_or_options' && return
case $state in
- (command)
- __git_aliases_and_commands
- ;;
- (options)
- curcontext="${curcontext%:*:*}:git-$words[1]:"
- _call_function ret _git-$words[1]
+ (cmd_or_options)
+ if (( CURRENT == 1 )); then
+ __git_aliases_and_commands
+ else
+ curcontext="${curcontext%:*:*}:git-$words[1]:"
+ _call_function ret _git-$words[1]
+ fi
;;
esac
else
next prev parent reply other threads:[~2008-09-01 19:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 18:06 Frank Terbeck
2008-09-01 18:17 ` Frank Terbeck
2008-09-01 19:22 ` Clint Adams [this message]
2008-09-01 20:03 ` Frank Terbeck
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=20080901192226.GA4928@scru.org \
--to=clint@zsh.org \
--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).