Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] docs: clarify _arguments {...} action behaviour
- X-seq: zsh-workers 54818
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] docs: clarify _arguments {...} action behaviour
- Date: Fri, 19 Jun 2026 21:52:08 +0000
- Archived-at: <https://zsh.org/workers/54818>
- Feedback-id: i9be146f9:Fastmail
- List-id: <zsh-workers.zsh.org>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author