From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Command Completion
Date: Tue, 11 Sep 2012 07:15:17 -0700 [thread overview]
Message-ID: <120911071517.ZM19458@torch.brasslantern.com> (raw)
In-Reply-To: <504F34BC.7010406@goots.org>
On Sep 11, 1:55pm, Nick Cross wrote:
}
} https://github.com/defunkt/hub/blob/master/etc/hub.zsh_completion
}
} Ideally I would like to use the hub binary command to complete standard
} git commands plus the extra commands it provides (e.g. pull-request).
I suggest you start by looking at Completion/Unix/Command/_git, more
specifically the function _git_commands. I don't know the answer to
the comment it poses at the end (about _alternative vs. the stack of
calls to _describe) but I suspect you could add one more _describe -t
with the hub commands.
To avoid mucking with _git_commands, just use a wrapper that ends with
something like
local ret=1
_git_commands && ret=0
_describe -t hub-extra-commands 'extra command from hub project' ... \
&& ret=0
return ret
(where "..." is what you fill in).
next prev parent reply other threads:[~2012-09-11 14:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 12:55 Nick Cross
2012-09-11 14:15 ` Bart Schaefer [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-14 20:59 command completion Vincent Lefevre
2011-08-14 21:09 ` Mikael Magnusson
2011-08-14 21:54 ` Vincent Lefevre
2011-08-14 22:14 ` Bart Schaefer
2011-08-14 23:07 ` Vincent Lefevre
2011-08-14 23:56 ` Bart Schaefer
2011-08-15 0:57 ` Vincent Lefevre
2011-08-15 4:13 ` Bart Schaefer
2011-08-15 9:18 ` Vincent Lefevre
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=120911071517.ZM19458@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/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).