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

Re: Safety guards for typos



On Sun, Jan 23, 2022 at 6:11 PM Phil Pennock
<zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
>
> I tried it and the protection doesn't appear to fire.  Is it possible
> that the examination of multiple words before the function definition
> happens prior to globbing expansion?

Yes, that's it.  It happens when "()" is tokenized.

> % *() { echo wibble }

How often would you find a glob as the first word in a command line, though?




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