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

Re: When _alternative separates the options?



Sebastian Gniazdowski wrote:
> _alternative 'snippets:downloaded snippets:compadd -a - snippets' \
>      'snippets:already loaded snippets:compadd -a - snippets_alreadyld' \
>      'files:file:_files' && \
>          ret=1
>
> The "downloaded snippets" and "already loaded snippets" will be
> merged. Is there a way to separate those?

Try giving them a different tag. Otherwise they will end up in the same
group. So something like:

  _alternative \
    'downloaded-snippets:downloaded snippet:compadd -a - snippets' \
    'already-loaded-snippets:already loaded snippet:compadd -a - snippets_alreadyld'
    ...

As an aside, the normal zsh convention is plural form for the tags and
singular for the group descriptions.

Oliver



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