From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1266 invoked by alias); 20 Sep 2011 15:22:23 -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: 29786 Received: (qmail 6755 invoked from network); 20 Sep 2011 15:22:10 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.218.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QKx19e3Wl8omDZHa8aZLA1zm+nqMihTKCQTyIewZeTQ=; b=WmzfrVQILnmgjaH8mdlCiwPuPE/5aQCYFHZY8Y9cUu4KMkkQkPTN542BrbRRs1r6VT Jik1533gYs8ACVBsvQfVT2XqSr+U9Z2Yy5CyeqI8sxRXA4oTKhMPdfdqnfbFga+mMMGC TpTX7xXE6wyJlPvBgUWru686dSG9KgZrJSm78= MIME-Version: 1.0 In-Reply-To: <110911111050.ZM11625@torch.brasslantern.com> References: <110911111050.ZM11625@torch.brasslantern.com> Date: Tue, 20 Sep 2011 17:16:33 +0200 Message-ID: Subject: Re: using the description from _arguments foo:description:->state From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On 11 September 2011 20:10, Bart Schaefer wrote: > On Sep 11, 5:04pm, Mikael Magnusson wrote: > } > } "($opts)-A[define widget alias]:old widget:->widget :new widget:->widget" > } > } Is there any way to get that description from the $state handler and > } pass it on to compadd? [partial quote] > Given the usual state (ahem) of the _arguments code, it's surprisingly > straightforward to add a parallel array for passing back the description: > > However, because callers of _arguments are responsible for declaring > state as a local, there are a HUGE number of files that would have to > be updated to also declare state_descr as a local ... UNLESS we were > willing to declare it local in _main_complete as is done with the > opt_args variable (which is also supposed to be declared local by all > callers of _arguments but conspicuously is not by several completers > including _zle). > > Opinions? Can we add a new option to _configure which enables this, so if you say _arguments -d you also have to local state_descr. There's a couple of other variables that work like this already, -n for NORMARG, -C for curcontext. -- Mikael Magnusson