zsh-workers
 help / color / mirror / code / Atom feed
* _alternative -O undocumented?
@ 2011-05-14  1:25 Mikael Magnusson
  2011-05-14 18:02 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2011-05-14  1:25 UTC (permalink / raw)
  To: zsh workers

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: _alternative -O undocumented?
  2011-05-14  1:25 _alternative -O undocumented? Mikael Magnusson
@ 2011-05-14 18:02 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2011-05-14 18:02 UTC (permalink / raw)
  To: zsh workers

On Sat, 14 May 2011 03:25:15 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:
> 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.

Sounds sensible.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-14 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-14  1:25 _alternative -O undocumented? Mikael Magnusson
2011-05-14 18:02 ` Peter Stephenson

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).