From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3031 invoked by alias); 29 Jun 2011 20:49:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29520 Received: (qmail 29838 invoked from network); 29 Jun 2011 20:49:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh workers Cc: Nikolai Weibull , Mikael Magnusson Subject: PATCH: (0/3) _git fixes and enhancements Date: Wed, 29 Jun 2011 22:37:10 +0200 Message-Id: <1309379833-31315-1-git-send-email-ft@bewatermyfriend.org> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1309211717-9650-1-git-send-email-ft@bewatermyfriend.org> References: <1309211717-9650-1-git-send-email-ft@bewatermyfriend.org> X-Df-Sender: 430444 Hey list! This is a small series that (hopefully) improves _git a little. _git: Fall back to file completion if nothing else works The first patch does basically the same as the one from workers-29512 did. But on IRC Mikael reminded me of workers-29453, which basically makes the point that most sub-command completions are not suited to be used with `_call_function', since they set `ret' themselves. Therefore, the second patch removes the use of `_call_function' and just calls the sub-command completion directly (just like Mikael did in `workers-29453'). The file-completion fallback is only used if `_git-foo()' is not defined. So, the completion behaviour of know sub-commands does *not* change at all. workers-29512: workers-29453: _git: Pick up addon completions from $fpath The second patch goes ahead and collects all `_git-*' completion files from `$fpath' and makes them available for: % git There is optional support for specifying a description for the addon command in the second line of the function if file, if that second line matches "#desc:*". Such a completion may look like this (say, this is a file called `_git-foo'): [snip] #compdef git-foo #desc:checks git's foobar value [...] [snap] With this, the patch from workers-29514 isn't needed anymore. I'll drop it therefore. _git: re-add `user-commands' support again The third patch just re-adds the use of the `user-commands' style like it's documented on top of `_git'. This (probably) got accidentally dropped when Nikolai did the major `_git'-update. Completion/Unix/Command/_git | 50 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 49 insertions(+), 1 deletions(-)