zsh-workers
 help / color / mirror / code / Atom feed
From: Eskandar Ensafi <esky@CS.UCLA.EDU>
To: zsh-workers@math.gatech.edu
Subject: Wrong Exit Codes?
Date: Tue, 16 Apr 1996 12:31:12 -0700	[thread overview]
Message-ID: <9604161931.AA10844@marathon.cs.ucla.edu> (raw)


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



             reply	other threads:[~1996-04-16 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-16 19:31 Eskandar Ensafi [this message]
1996-04-17  7:32 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9604161931.AA10844@marathon.cs.ucla.edu \
    --to=esky@cs.ucla.edu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).