Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Parse errors don't cause a non-zero exit code?
- X-seq: zsh-workers 21071
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Parse errors don't cause a non-zero exit code?
- Date: Tue, 29 Mar 2005 17:17:19 -0600
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
$ echo "'" > /tmp/test ; zsh -f /tmp/test ; echo $?
/tmp/test:2: unmatched '
0
ksh93, ash, and bash all return non-zero here, and it looks like
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_08
wants a non-zero result also.
A co-worker asked about it because he wanted to use "zsh -n" to test
user-submitted scripts for silly typos before running them. Checking
for output on stderr is a workaround.
A related comment: The zsh documentation uses all six combinations of
"{exit,return} {code,value,status}", making it hard to search :(
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author