Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] docs: clarify _arguments {...} action behaviour



dana wrote:
> 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

The problem is that the sentence has been reorganised to be under the
{...} action form. If you go back and read the sentence in the original
context, which was free-form text rather than a list, it is clear that
what it is saying is that if you don't use the {...} or (...) action
form, then it will be split into words.

I quite often check earlier documentation for completion to avoid later
corruptions. The first sentence isn't great either, you might assume
that it means you can do something like { * } to add filenames as
matches but it still needs to be doing actual compadd calls, whether
directly or otherwise. The sentence should be removed from the list item
it now appears under. Not sure if the effects are more wide-ranging than
removing the limit on a single command: {...} has never been especially
useful.

Oliver




Messages sorted by: Reverse Date, Date, Thread, Author