zsh-users
 help / color / mirror / code / Atom feed
From: John <jmharres@gmail.com>
To: zsh-users@zsh.org
Subject: compsys: argument with pre-requisite argument
Date: Sun, 24 Nov 2013 08:44:56 -0700	[thread overview]
Message-ID: <52921EF8.8080909@gmail.com> (raw)

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


             reply	other threads:[~2013-11-24 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-24 15:44 John [this message]
2013-11-24 16:00 ` llua
2013-11-24 19:01 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52921EF8.8080909@gmail.com \
    --to=jmharres@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).