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

Re: When is a pre-command assignment syntactically valid?



On Wed, Dec 6, 2017 at 3:23 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> I think the rule is: "reserved words may not be preceded by parameter
> assignments".  Is that accurate?

Literally, the rule is "parameter assignments may precede only a
simple command."  (In fact the assignment syntax is part of the
definition of simple command syntax.)

Of the set of $reswords from zsh/parameter, "nocorrect" and all of the
aliases for "typeset" may begin a simple command.  The rest may not.



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