From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18591 invoked by alias); 12 Dec 2016 08:55:55 -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: 40161 Received: (qmail 21660 invoked from network); 12 Dec 2016 08:55:55 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.com 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(66.111.4.28):SA:0(-0.7/5.0):. Processed in 2.294307 secs); 12 Dec 2016 08:55:55 -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=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=bfbWjwdrXFfPUS+ XBbEam5mS9CQ=; b=1+QyS2/20/HU2dYzs5KY1tUcWUL/FHenbQ6DxZLiUAoAkQH 1tv6paLnxBG/hfoQBG1YYyVlT8O/1Q+LeQVPXuxW+80ahdiQvgdO0WEqLgzTZkct wzun8KSku/Ih2hu4M9AvP3J4VkmgtDCPO5cTufgmJs3NdpIymLRP6ElujNWc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=bfbWjwdrXFfPUS +XBbEam5mS9CQ=; b=n3pBjCdlO6sqiMDdN7w3o3qn/wbJCPrhEu2VWPyUv8y4yZ Dj5h6mcVQdDhXSDeUgyY9v70INoBasVkPGxv7ryNwhAd2Fwke7H2ONNSV5awBBXx r+8JgkQTRME6GarNQ7AnqaTpIgp2xllnVxR4lBbLbs4aYaSwi/RdjAVy9K2ZA= X-ME-Sender: X-Sasl-enc: tiLJ3gQwonRLTsd6czZyJ4EKUaB3Q+ZZ8hatou2re9MX 1481532949 Date: Mon, 12 Dec 2016 08:52:58 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: _os_arguments Message-ID: <20161212085258.GB11457@fujitsu.shahaf.local2> References: <20161212052803.GA53519@CptOrmolo.darkstar> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161212052803.GA53519@CptOrmolo.darkstar> User-Agent: Mutt/1.5.23 (2014-03-12) Matthew Martin wrote on Sun, Dec 11, 2016 at 23:28:03 -0600: > +++ b/Doc/Zsh/compsys.yo > @@ -4624,6 +4624,60 @@ are used to store the option settings in effect before the completion > widget locally sets the options it needs. Hence these functions are not > generally used by the completion system. > ) > +findex(_os_arguments) > +xitem(tt(_os_arguments )[ var(_arguments flags) tt(:) ] {var(OS selector)|var(spec)} ) Should be item(), not xitem(). The former is for all-but-the-last when there's more than one item() heading before a paragraph. Add a `...' at the end to indicate the {..} group is repeatable? Eliminate the space inside the tt()? > +This function wraps tt(_arguments) to ease completing multiple OSes with > +differing flags. The arguments up to the first colon are passed verbatim > +to tt(_arguments). Following arguments are either OS selectors, > +consisting of all uppercase letters, or tt(_arguments) specs. Each OS is > +assigned a letter (see below). If that letter appears in an OS selector > +since the last spec (or if there is no proceeding OS selector), the > +following specs are passed to tt(_arguments) until the next OS selector. > + > +startitem() Use startsitem()? I think the 's' stands for 'short', which would be more appropriate in this instance. Add some linking sentence? "The following OS selectors are available:". The text implies unknown OS selectors are silently ignored, which is good for forwards compatibility (completion functions running on an older zsh than they target). > +item(tt(S))( > +Solaris > +) > +enditem() > + > +example(_os_arguments -s : \\ \ > + '-n[number all output lines]' \\ \ > + '-u[do not buffer output]' \\ \ > + '(-)*:files:_files' \\ \ > + N '-B[use specified buffer size]:buffer size:' \\ \ > + F N '-l[set a lock on the stdout file descriptor]' \\ \ > + DFMNO '-v[display non-printing chars as ^X or M-a]' > +) Missing ')'. Also, consider adding a prose description of what the example code does. The yodl looks good; haven't reviewed the functions. Cheers, Daniel > findex(_parameters) > item(tt(_parameters))( > This is used to complete the names of shell parameters. >