[PATCH] docs: clarify _arguments {...} action behaviour
dana <[email protected]> Fri, 19 Jun 2026 21:52:08 +0000
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <[email protected]> |
the explanation for the {...} action form says:
> If the eval-string itself does not begin with an opening parenthesis
> or brace it is split into separate words before execution.
afaict this isn't true? the string inside the braces is simply passed to
eval. and i can't find any functions that use the syntax it's describing
i'm not even sure what it means by split into separate words. eval
doesn't care about that. maybe a long time ago '{...}' did what ' ...'
does now?
this (truthfully) clarifies the difference between the two
dana
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index e08ca30ec..a9b965998 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -3985,9 +3985,9 @@ to prevent tt(_arguments) from altering the global environment.
)
item(tt({)var(eval-string)tt(}))(
vindex(expl, use of)
-A string in braces is evaluated as shell code to generate matches. If the
-var(eval-string) itself does not begin with an opening parenthesis or
-brace it is split into separate words before execution.
+A string in braces is evaluated as shell code to generate matches.
+This is similar to the `tt(SP())var(word) var(...)' action described
+below, but isn't limited to a single command.
)
item(tt(= )var(action))(
If the var(action) starts with `tt(= )' (an equals sign followed by a
@@ -4005,8 +4005,8 @@ causes tt(_arguments) on a restricted range; it is necessary to use this
trick to insert an appropriate command name into the range for the second
call to tt(_arguments) to be able to parse the line.
)
-xitem(var(tt(SP())word...))
-item(var(word...))(
+xitem(tt(SP())var(word) var(...))
+item(var(word) var(...))(
This covers all forms other than those above. If the var(action)
starts with a space, the remaining list of words will be invoked unchanged.