From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8319 invoked from network); 28 Jul 2003 06:46:49 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Jul 2003 06:46:49 -0000 Received: (qmail 25319 invoked by alias); 28 Jul 2003 06:46:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6418 Received: (qmail 25308 invoked from network); 28 Jul 2003 06:46:32 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Jul 2003 06:46:31 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.35.17.14] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Jul 2003 6:46:31 -0000 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.11.7/8.11.7) with ESMTP id h6S6kVN00816; Mon, 28 Jul 2003 08:46:31 +0200 (MEST) Received: from MOWD019A.mow.siemens.ru ([163.242.196.119]) by mail3.siemens.de (8.11.7/8.11.7) with ESMTP id h6S6kUG13128; Mon, 28 Jul 2003 08:46:30 +0200 (MEST) Received: by mowd019a.mow.siemens.ru with Internet Mail Service (5.5.2653.19) id ; Mon, 28 Jul 2003 10:53:11 +0400 Received: from mw2b210c (163.242.193.12 [163.242.193.12]) by MOWD019A.mow.siemens.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id P4HNSNDY; Mon, 28 Jul 2003 10:52:55 +0400 From: Borzenkov Andrey To: "'Malte Starostik'" , zsh-users@sunsite.dk Subject: RE: exit status of interactive shell Date: Mon, 28 Jul 2003 10:46:09 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C996@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <200307280100.27387.malte.starostik@t-online.de> >=20 > 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 !=3D 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? >=20 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