summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authordana <dana@dana.is>2025-04-13 18:00:54 -0500
committerdana <dana@dana.is>2025-04-19 18:48:31 -0500
commit8c3c45732131433645686cdb6bbbb8974230c5a9 (patch)
treeccaa627886d33bf6d8ae2c84b08e511880870eef /Doc
parent494fcd1799d4d2d236d3183de12b0c99ceb83b1c (diff)
downloadzsh-8c3c45732131433645686cdb6bbbb8974230c5a9.tar.gz
zsh-8c3c45732131433645686cdb6bbbb8974230c5a9.zip
53483: zparseopts -G: accept only '--' as parsing terminator
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/mod_zutil.yo14
1 files changed, 9 insertions, 5 deletions
diff --git a/Doc/Zsh/mod_zutil.yo b/Doc/Zsh/mod_zutil.yo
index 76907352f..19f9989f4 100644
--- a/Doc/Zsh/mod_zutil.yo
+++ b/Doc/Zsh/mod_zutil.yo
@@ -242,8 +242,8 @@ Note that it is an error to give any var(spec) without an
Unless the tt(-E) option is given, parsing stops at the first string
that isn't described by one of the var(spec)s. Even with tt(-E),
-parsing always stops at a positional parameter equal to `tt(-)' or
-`tt(-)tt(-)'. See also tt(-F).
+parsing always stops at a positional parameter equal to `tt(-)tt(-)' or
+(without tt(-G)) `tt(-)'. See also tt(-F).
The var(opt) description must be one of the following. Any of the special
characters can appear in the option name provided it is preceded by a
@@ -314,9 +314,9 @@ as the values.
item(tt(-D))(
If this option is given, all options found are removed from the positional
parameters of the calling shell or shell function, up to but not including
-any not described by the var(spec)s. If the first such parameter is `tt(-)'
-or `tt(-)tt(-)', it is removed as well. This is similar to using the
-tt(shift) builtin.
+any not described by the var(spec)s. If the first such parameter is
+`tt(-)tt(-)' or (without tt(-G)) `tt(-)', it is removed as well. This is
+similar to using the tt(shift) builtin.
)
item(tt(-E))(
This changes the parsing rules to em(not) stop at the first string
@@ -364,6 +364,10 @@ A mandatory option-argument given in a separate parameter from its
option (as in `tt(-)tt(-foo) tt(bar)'), or any option-argument given to
a short option in the same parameter, is always treated the same
regardless of whether this option is in effect.
+
+Lastly, when this option is active, only `tt(-)tt(-)' is treated as an
+explicit option-parsing terminator in the parsed arguments; a single
+`tt(-)' is considered a normal operand.
)
item(tt(-K))(
With this option, the arrays specified with the tt(-a) option and with the