Subject: Re: _values and end of options
From: Marko Myllynen <[email-masked]>
To: [email-masked]
Date: Thu, 9 Jun 2016 21:11:55 +0300
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Hi,

On 2016-06-09 18:43, Oliver Kiddle wrote:
> Marko Myllynen wrote:
>>
>> Otherwise this works nicely (each of the options is completed only once)
>> but -1 -2 are missing from offered options (see _values). I can use --
>> to have them included as well (_values -w opts -- $opts) but then -- is
>> also offered.
> 
> _values starts with a call to zparseopts to remove normal compadd
> style options such as -1 and -2. In general these shouldn't occur after
> (or mixed with) the values. It mostly occurs when _values is used
> within an _arguments spec. In that case the unwanted options only appear
> at the beginning. The following patch makes it only remove compadd style
> options that occur at the beginning.
>  
> -zparseopts -D -E -a garbage C=usecc O:=subopts M: J: V: 1 2 n F: X:
> +zparseopts -D -a garbage C=usecc O:=subopts M: J: V: 1 2 n F: X:
>  

With this change all works here now as I hoped, thanks!

Cheers,

-- 
Marko Myllynen