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

compsys: argument with pre-requisite argument



I understand the exclusion option for an _arguments list, but I'm wondering if there is anything of the sort that would allow me to have pre-requisite arguments. I haven't found an example to work off, but what I want is something like:

_arguments \
        '-D+[debug]:debug level(0 1)' \
        '--opt1[opt1 description]' \
        '--special[special case]' \
        '-a[special case a]' \
        '-b[special case b]'

such that -a and -b are only available if --special was already specified, but --opt1 and -D are always available for completing.

TIA,
John



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