zsh-workers
 help / color / mirror / code / Atom feed
* Wrong Exit Codes?
@ 1996-04-16 19:31 Eskandar Ensafi
  1996-04-17  7:32 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Eskandar Ensafi @ 1996-04-16 19:31 UTC (permalink / raw)
  To: zsh-workers


Hello,

Is this a bug or a feature (I would call it a bug, unless there is an
option to turn this behavior off):

If the previous command causes an error, then typing "exit" will exit
zsh (2.6 beta14) with the previous command's non-zero exit code.

For example:

% zsh
% echo good_command
good_command
% exit
% echo $?  # Zero exit code as expected.
0
% zsh
% bad_command
zsh: command not found: bad_command
% exit
% echo $?  # Notice the non-zero exit code.  Doesn't "exit" = "exit 0" ?
1
% exit

This behavior is wrong, isn't it?

Thanks!

- Eskandar



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

end of thread, other threads:[~1996-04-17  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-16 19:31 Wrong Exit Codes? Eskandar Ensafi
1996-04-17  7:32 ` 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).