From: Borzenkov Andrey <Andrey.Borzenkov@siemens.com>
To: "'Malte Starostik'" <malte.starostik@t-online.de>, zsh-users@sunsite.dk
Subject: RE: exit status of interactive shell
Date: Mon, 28 Jul 2003 10:46:09 +0400 [thread overview]
Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C996@mowd019a.mow.siemens.ru> (raw)
In-Reply-To: <200307280100.27387.malte.starostik@t-online.de>
>
> when leaving a shell, the return status is that of the last command.
> This makes sense, especially for scripts. But in an interactive shell,
> it's
> sometimes a little surprising. I use konsole as terminal app and it
> displays
> the exit status if != 0 when a session is closed. Now when the session was
> an
> interactive shell in which the last command failed/has been killed, this
> is
> displayed.
> Is there a way to make an interactive zsh always exit with 0 status unless
> the
> shell itself died uncleanly?
>
presumably you could try to trap EXIT in zshrc.
trap 'exit 0' EXIT
BTW should exit code be changeable by EXIT block? Currently doing
trap 'return 0' EXIT
does not work and I am not sure if it correct.
-andrey
prev parent reply other threads:[~2003-07-28 6:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-27 23:00 Malte Starostik
2003-07-28 6:46 ` Borzenkov Andrey [this message]
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=6134254DE87BD411908B00A0C99B044F05A0C996@mowd019a.mow.siemens.ru \
--to=andrey.borzenkov@siemens.com \
--cc=malte.starostik@t-online.de \
--cc=zsh-users@sunsite.dk \
/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).