From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22346 invoked by alias); 11 Sep 2012 14:15:46 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17259 Received: (qmail 27807 invoked from network); 11 Sep 2012 14:15:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120911071517.ZM19458@torch.brasslantern.com> Date: Tue, 11 Sep 2012 07:15:17 -0700 In-reply-to: <504F34BC.7010406@goots.org> Comments: In reply to Nick Cross "Command Completion" (Sep 11, 1:55pm) References: <504F34BC.7010406@goots.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Command Completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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).