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

noexec does not detect subscript error



$ cat a.sh
a=$argv[
$ zsh -n a.sh
$ zsh a.sh
a.sh:1: invalid subscript

The above z shell commands show my a.sh only has "a=$argv[" which
clearly has a syntax error. Then I use zsh -n (noexec) to check the
syntax, zsh does not report any error.

Can the error be fixed so that the -n (noexec) detects these kinds of
apparent errors?




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