about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-09-27 16:53:58 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-09-27 16:53:58 +0000
commit966ff3a185ba150625cd14022392d310cf9c1649 (patch)
treec6a9ee0cfec16bb70e1b36a091fb9b6fab9fb396 /Doc
parent11dc3a29cf2556f7b29d3d92570191a3a3c43dbb (diff)
downloadzsh-966ff3a185ba150625cd14022392d310cf9c1649.tar.gz
zsh-966ff3a185ba150625cd14022392d310cf9c1649.tar.xz
zsh-966ff3a185ba150625cd14022392d310cf9c1649.zip
22780: add _arguments/comparguments -n to set index of first non-option arg
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/compsys.yo13
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 1a81eea3f..f65f15223 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -3237,12 +3237,21 @@ Like tt(_tags) this function supports the tt(-C) option to give a
 different name for the argument context field.
 )
 findex(_arguments)
-item(tt(_arguments) [ tt(-swWACRS) ] [ tt(-O) var(name) ] [ tt(-M) var(matchspec) ] [ tt(:) ] var(spec) ...)(
+item(tt(_arguments) [ tt(-nswWACRS) ] [ tt(-O) var(name) ] [ tt(-M) var(matchspec) ] [ tt(:) ] var(spec) ...)(
 This function can be used to give a complete specification for
 completion for a command whose arguments follow standard UNIX option and
 argument conventions.  The following forms specify individual sets of
 options and arguments; to avoid ambiguity, these may be separated from the
-options to tt(_arguments) itself by a single colon.
+options to tt(_arguments) itself by a single colon.  Options to
+tt(_arguments) itself must be in separate words, i.e. tt(-s -w), not
+tt(-sw).
+
+With the option tt(-n), tt(_arguments) sets the parameter tt(NORMARG)
+to the position of the first normal argument in the tt($words) array,
+i.e. the position after the end of the options.  If that argument
+has not been reached, tt(NORMARG) is set to tt(-1).  The caller
+should declare `tt(integer NORMARG)' if the tt(-n) option is passed;
+otherwise the parameter is not used.
 
 startitem()
 xitem(var(n)tt(:)var(message)tt(:)var(action))