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, Bart Schaefer wrote:

> 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)
> >
> > 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.

OK, I worked this out now.  The problem is that there's no options tag *in 
the argument-rest subcontext* but there are both values and files tags, so 
the presence of values in this tag hides the files.  Sorry to be dense.

The canonical examples of _values are _dd and _chmod, neither of which 
allows ambiguity in whether an argument is a value or a filename (dd takes 
only values, and chmod requires exactly one value before any filename).  
So I suspect this simply never came up before.



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