Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_values and specifying -M to compadd
- X-seq: zsh-users 11872
- From: Danek Duvall <duvall@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: _values and specifying -M to compadd
- Date: Sun, 23 Sep 2007 22:04:50 -0700
- Mail-followup-to: Danek Duvall <duvall@xxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I've spent a couple of hours trying to figure out how to do this, but am
stumped. I'm working on completion for the Solaris command pfexec, one
option of which takes an argument of a fixed set of tokens, separated by
commas, where each token may optionally be prefixed by a "!".
I can do the simple
_values -s , "descr" $tokens
where $tokens was set earlier to be ( $tokens \!$^tokens ), but that's
cheap, and it doubles the list of tokens, which isn't very nice looking.
I'd like it to just ignore a "!" when it's there, a la setopt's ignoring of
"no", but I can't figure out how to make that work with _values, which
doesn't seem to give an option to pass options (specifically -M) on to
compadd.
Is there some other reasonably simple way of doing this, or will I have to
invoke compadd directly?
Thanks,
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author