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

Re: _describe usage



Boyd Adamson wrote:
> I've tried a couple of approaches. My reading of the man page seems to
> imply I can do this:
> 
>     rts=(apple banana)
>     srts=(cat dog)
>     _describe "fruit" rts -- "animal" srts

You can't specify a different description for the second group (after
`--'). Only other completion options like suffixes.

> I also tried this:
> 
>     rts=(apple banana)
>     srts=(cat dog)
>     _describe "fruit" rts 
>     _describe "animal" srts 

That would work if you specify a different tag for the two sets of
completions:
  _describe -t fruits fruit rts
  _describe -t animals animal srts

Otherwise, both fruits and animals are added with the tag `values'. It
is the tag rather than the description which determines the grouping of
matches.

Oliver



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