From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26964 invoked by alias); 28 Jul 2016 18:18:47 -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: 38959 Received: (qmail 3563 invoked from network); 28 Jul 2016 18:18:47 -0000 X-Qmail-Scanner-Diagnostics: from hermes.apache.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(140.211.11.3):SA:0(-1.3/5.0):. Processed in 0.126633 secs); 28 Jul 2016 18:18:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at apache.org does not designate permitted sender hosts) Date: Thu, 28 Jul 2016 18:12:02 +0000 From: Daniel Shahaf To: Zsh workers Subject: Re: PATCH: widget completion Message-ID: <20160728181202.GA11899@tarsus.local2> References: <83384.1469658454@hydra.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83384.1469658454@hydra.kiddle.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Oliver Kiddle wrote on Thu, Jul 28, 2016 at 00:27:34 +0200: > We've got quite a few functions that need to complete zle widgets so it > seems to warrant factoring out into an _widgets function. This at least > encapsulates the matching control. Docs for this: diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index a50df99..41864f8 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -5046,6 +5046,16 @@ Like tt(_tags) this function supports the tt(-C) option to give a different name for the argument context field. The tt(-x) option has the same meaning as for tt(_description). ) +findex(_widgets) +item(tt(_widgets) [ tt(-g) var(pattern) ])( +This function completes names of zle widgets (see +ifzman(the section `Widgets' in zmanref(zshzle))\ +ifnzman(noderef(Zle Widgets))\ +). The var(pattern), if present, is matched against values of the tt($widgets) +special parameter, documented in +ifzman(the section `The zsh/zleparameter Module' in zmanref(zshmodules))\ +ifnzman(noderef(The zsh/zleparameter Module)). +) enditem() texinode(Completion Directories)()(Completion Functions)(Completion System) I put in an xref for "Zle Widgets" because zshcompsys(1) defines the term `widget' near the top to a slightly different meaning. (By the way, the bulleted list after "More generally," renders oddly in the man page version here: no empty line before the first bullet and two empty lines between the bullets.) Cheers, Daniel