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

Re: default tag-order (was Re: zsh 4.2.1-test-A)



On Sun, 8 Aug 2004, Oliver Kiddle wrote:

> The problem is with the default tag-order defined in _tags. The relevant
> bit of code is as follows:
>      zstyle -a ":completion:${curcontext}:" tag-order order ||
>          order=('(|*-)argument-* (|*-)option[-+]* values' options)
>
> There are a few different things we could do here. I can't work out why
> "values" needs to be in there.
> 
> One safe option is to insert `(( ! ${@[(I)options]} )) ||'.
> That checks if there is an options tag before applying the tag-order.

I'm confused by this suggestion.  If there's no options tag, the tag-order 
doesn't make any difference, because it's in the second group of tags.  
And in the case of cdrecord, there _is_ an options tag.  How would that
proposed change help?

> Any other thoughts?
> 
> Default tag-orders really need thinking about in general. It'd be nice
> to be able to specify them from completion functions themself.

Why is that not possible?  For example, several completion functions set 
the cache-policy style if it's not already set.



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