about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-10-29 20:13:58 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-10-29 20:13:58 +0000
commit52f25ab3d2d81a7c3172a54e3c0824de40b30270 (patch)
tree0013ad2ed5e90dd6141f6b058c1471ecda043ff4 /Doc
parentb0dd9cf2a2dce3cc1b656fa79c8fb3e548a02132 (diff)
downloadzsh-52f25ab3d2d81a7c3172a54e3c0824de40b30270.tar.gz
zsh-52f25ab3d2d81a7c3172a54e3c0824de40b30270.tar.xz
zsh-52f25ab3d2d81a7c3172a54e3c0824de40b30270.zip
Merge of 22780: _arguments -n sets NORMARG to index of first non-option argument (via comparguments -n).
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))