Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_alternative -O undocumented?
- X-seq: zsh-workers 29271
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: _alternative -O undocumented?
- Date: Sat, 14 May 2011 03:25:15 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=rkbOOzIgNXv0765fspoNXtwDq2foWsoyW85Psi1yWb8=; b=N81t2V2Sm2YjqLSAtlYF5rEqlP36WMqjSamgYy4HWtk1VF92AEGqPGpWSOSCN9/dIv gscqsFVDizkbTcI6PkxwUrz2RUPyguT7dgo9DIeLnsmkpFUUeGRrbsx0jEbM+30PxQyD N+DsDm1c+5EEFsnZmNF42AEih2IoerJKRY4QE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=u1H2uuepT1UIlzINdDq5XFJRV+LYLkTDCjlaSxPrRsJD4MSgjTEfm+fGko+9fkeazL 1iiuEHqpyOSvqblzF8IBtf5TjweH53MOkpz4QcEbbyyowJNb9vz0Vn7gUihe+89H3M/6 S5Jw3omnF8C9mkeJsp5y846oG8ty47rLXpHl0=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
It seems _alternative allows passing arbitrary options down to compadd
by doing foo=( '-V' 'foo' ); _alternative -O foo, but the
documentation doesn't mention it. _chmod, _which, _zstyle, _aliases
and _command_names make use of this feature. _values has this feature
too and documents it,
If the first argument is the option `-O name', it will be used in the
same way as by the _arguments function. In other words, the elements
of the name array will be passed to compadd when executing an action.
Can I copy this paragraph into the _alternative section? Possibly
modifying for it not having to be the first option.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author