From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21515 invoked from network); 27 May 2005 14:19:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 May 2005 14:19:23 -0000 Received: (qmail 27180 invoked from network); 27 May 2005 14:19:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 May 2005 14:19:17 -0000 Received: (qmail 7833 invoked by alias); 27 May 2005 14:19:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21287 Received: (qmail 7824 invoked from network); 27 May 2005 14:19:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 May 2005 14:19:14 -0000 Received: (qmail 26890 invoked from network); 27 May 2005 14:19:14 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 27 May 2005 14:19:10 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IH500LBVJRW37J3@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Fri, 27 May 2005 09:19:09 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j4REJ7Ch021912; Fri, 27 May 2005 07:19:07 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j4REJ6QX021911; Fri, 27 May 2005 07:19:06 -0700 Date: Fri, 27 May 2005 14:19:06 +0000 From: Bart Schaefer Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR). In-reply-to: <42971795.8090005@free.fr> To: Christophe Martin , Clint Adams , 310872@bugs.debian.org Cc: zsh-workers@sunsite.dk Message-id: <1050527141906.ZM21908@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable References: <200505261638.SAA09610@sdt.univ-brest.fr> <20050526191520.GA30061@scowler.net> <1050527012028.ZM21361@candle.brasslantern.com> <42971795.8090005@free.fr> Comments: In reply to Christophe Martin "Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR)." (May 27, 2:50pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On May 27, 2:50pm, Christophe Martin wrote: } Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR= ). } } Bart Schaefer a =E9crit : } > } > A possible workaround would be } > } > (( $signals[(I)ERR] )) || alias -g ERR=3DZERR } = } But, If i keep zsh as ksh } I have to rewrite every script to put this workaround in. No, you just have to put the above in /etc/zshenv, which is read by all instances of zsh, whether script or interactive. } So, for this particular problem of trap ERR, there are only problems } in using zsh as a ksh That's not the only incompatibility, by a long shot. Don't try scripts using namerefs or discipline functions, for example. } (By the way, what are the platform with OS } SIGERR ? And do some ksh run on them ?) UNICOS, according to the Zsh FAQ. I have no idea whether ksh has been ported to that.