Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
noexec does not detect subscript error
- X-seq: zsh-workers 49710
- From: gqqnb2005 <gqqnb2005@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: noexec does not detect subscript error
- Date: Wed, 26 Jan 2022 21:42:59 +0800
- Archived-at: <https://zsh.org/workers/49710>
- List-id: <zsh-workers.zsh.org>
$ 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