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

"bad substitution" error for ${a[b]}



I'm trying to understand the following:

> echo '$a[b]' | zsh -fn

> echo '${a[b]}' | zsh -fn
zsh: bad substitution

Specifically, what's wrong with the second line?

I have vim doing basic syntax checking by running zsh -n and noticed
that it was complaining about the second line (obviously turned into a
minimal case) but not the first.  The script runs fine either way so I'm
not sure what's up.  Asked the folks on #zsh and they suggest I report
the issue here.

Thanks,

 - J<



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