From 7aefbdb937fcb1ff95a00f76ef386a644218d326 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 14 May 2011 18:16:44 +0000 Subject: 29271: document _alternative -O name. --- ChangeLog | 6 +++++- Doc/Zsh/compsys.yo | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ded88181d..031a6c851 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-05-14 Mikael Magnusson + + * 29271: Doc/Zsh/compwid.yo: document _alternative -O name. + 2011-05-14 Peter Stephenson * 29282: Src/mem.c: hide prototypes for ZSH_HEAP_DEBUG with @@ -14708,5 +14712,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5303 $ +* $Revision: 1.5304 $ ***************************************************** diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 0fdd6d017..35b200bd2 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -3419,7 +3419,7 @@ tt(compadd) with additional options which will take precedence over those generated by tt(_all_labels). ) findex(_alternative) -item(tt(_alternative) [ tt(-C) var(name) ] var(spec) ...)( +item(tt(_alternative) [ tt(-O) var(name) ] [ tt(-C) var(name) ] var(spec) ...)( This function is useful in simple cases where multiple tags are available. Essentially it implements a loop like the one described for the tt(_tags) function below. @@ -3446,6 +3446,10 @@ the actions, which will loop over all sets of tags. Special handling is only required if there is an additional valid tag, for example inside a function called from tt(_alternative). +The option `tt(-O) var(name)' is used in the same way as by the +tt(_arguments) function. In other words, the elements of the var(name) +array will be passed to tt(compadd) when executing an action. + Like tt(_tags) this function supports the tt(-C) option to give a different name for the argument context field. ) -- cgit 1.4.1