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

Re: Typeset with array



On Jun 19,  7:36pm, Oliver Kiddle wrote:
}
} Is there a reason why noglob can't precede assignments. That could be
} useful.

The most obvious reason is that noglob is a precommand modifier, which
quite literally means the parser is looking for a command to follow it
and doesn't find one.

It's the same reason that "exec x=foo" doesn't work, although zsh doesn't
discover that "x=foo" is not a command until the parent shell has already
committed to exiting (in bash, an interactive shell returns to the prompt
on "exec command-that-does-not-exist").

On the other hand nocorrect is allowed to appear before assignments, so
there probably isn't any overriding reason that noglob can't be also,
other than that nocorrect is a reserved word and noglob is not.



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