Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compsys: argument with pre-requisite argument
- X-seq: zsh-users 18161
- From: John <jmharres@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: compsys: argument with pre-requisite argument
- Date: Sun, 24 Nov 2013 08:44:56 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=IFo79TjzsxK8OpdfK/9sWNfOoJFbB74NKzMSDP28qt8=; b=HcmgopnRESnQBThHUUWU/KuLG3/S3rk4lR23m4W05B0x4a6cvw12QOWVx4DKO9dkyO EnHH4MnsqyqbRk8Qs1BIBK2I9e5UALy2/IMLHdvIVdWCU7z9kYPrb19h+93uYwAnQ2dF nGYMe8X3qeQ6RTNQRS7zrjIERsTpn5Ou8avKKCzyhbr3v7gjWhYP/5B+t95zSSsWEUnc vBLFv4hmIgCQeqiNQgI6qg7qcWmCi0bWRx3eCZvP8BLvy0kqTF85HcREbwzhXp0FDg+V y06FPuqnCMEFFADlplziL1YmEPVqww6tMxYudkJbWGPOt1/+PyiUwLNL3sXrk99z1ykm SNnQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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