From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23611 invoked by alias); 14 May 2011 18:02:40 -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: 29287 Received: (qmail 23153 invoked from network); 14 May 2011 18:02:37 -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 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.47 as permitted sender) Date: Sat, 14 May 2011 19:02:29 +0100 From: Peter Stephenson To: zsh workers Subject: Re: _alternative -O undocumented? Message-ID: <20110514190229.6614819e@pws-pc.ntlworld.com> In-Reply-To: References: X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=eny9cqifiPoA:10 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=NLZqzBF-AAAA:8 a=lLBlFBEAU4IYrnD_sDUA:9 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Sat, 14 May 2011 03:25:15 +0200 Mikael Magnusson wrote: > It seems _alternative allows passing arbitrary options down to compadd > by doing foo=( '-V' 'foo' ); _alternative -O foo, but the > documentation doesn't mention it. _chmod, _which, _zstyle, _aliases > and _command_names make use of this feature. _values has this feature > too and documents it, > > If the first argument is the option `-O name', it will be used in the > same way as by the _arguments function. In other words, the elements > of the name array will be passed to compadd when executing an action. > > Can I copy this paragraph into the _alternative section? Possibly > modifying for it not having to be the first option. Sounds sensible. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/