zsh-workers
 help / color / mirror / code / Atom feed
* Parse errors don't cause a non-zero exit code?
@ 2005-03-29 23:17 Dan Nelson
  2005-03-31 17:14 ` Dan Nelson
  2005-04-01 12:08 ` Peter Stephenson
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Nelson @ 2005-03-29 23:17 UTC (permalink / raw)
  To: zsh-workers


$ 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@allantgroup.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-04-11 10:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-29 23:17 Parse errors don't cause a non-zero exit code? Dan Nelson
2005-03-31 17:14 ` Dan Nelson
2005-04-01 10:07   ` Peter Stephenson
2005-04-01 20:06     ` Dan Nelson
2005-04-01 12:08 ` Peter Stephenson
2005-04-09  0:50   ` Felipe Kellermann
2005-04-11 10:13     ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).