On Mon, Sep 28, 2026 at 5:23 PM Robert Elz <[email protected]> wrote: > > Date: Mon, 28 Sep 2026 15:39:32 -0400 > From: Chet Ramey <[email protected]> > Message-ID: <[email protected]> > > | The first part is the parser. It has to recognize `declare' as a > | declaration command so the assignment statement is parsed as a single > | word, instead of a syntax error. This can be defeated by quoting the > | `declare' or using variable expansion. > > All that is fine. (It really isn't, what technique is used to write > the command name shouldn't really matter, [...]).
The parser could assume that any instance of var=( whatever ) is a valid word until it knows otherwise. The first word that isn't an assignment statement didn't expand to a declaration utility? Woops, that's a syntax error.
