Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: using the description from _arguments foo:description:->state



On 11 September 2011 20:10, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author