From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10155 invoked from network); 2 May 2000 09:20:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 May 2000 09:20:26 -0000 Received: (qmail 29161 invoked by alias); 2 May 2000 09:20:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11055 Received: (qmail 29098 invoked from network); 2 May 2000 09:20:10 -0000 Date: Tue, 02 May 2000 10:19:42 +0100 From: Peter Stephenson Subject: Re: TRAPZERR() in chpwd() In-reply-to: "Your message of Mon, 01 May 2000 17:37:56 EDT." <20000501173756.B11940@tdc134.comm.mot.com> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FTX00MAGDWUAU@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT Paul Ackersviller wrote: > I believe the change must've come after 3.1.6, since it exhibits the same > behaviour as 3.0.7 in my experience. It's only 3.1.7-pre-1 and (some?) > development versions leading up to it. Right, I think it's the wordcode stuff. I'm pretty sure I spent some time (possibly more than once...) getting this right a fair while ago. Sven, can you confirm that this is the right fix before I commit it? Or if not, what is, because this can't be too far away from the right answer. It seems to work with all the basic tests I've tried. Index: Src/exec.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/exec.c,v retrieving revision 1.5 diff -u -r1.5 exec.c --- Src/exec.c 2000/04/10 09:18:27 1.5 +++ Src/exec.c 2000/05/02 09:15:33 @@ -836,7 +836,8 @@ code = *state->pc++; next = state->pc + WC_SUBLIST_SKIP(code); } - if (wc_code(code) != WC_SUBLIST) { + if (wc_code(code) != WC_SUBLIST || + WC_SUBLIST_TYPE(code) == WC_SUBLIST_END) { /* We've skipped to the end of the list, not executing * * the final pipeline, so don't perform error handling * * for this sublist. */ @@ -861,7 +862,8 @@ code = *state->pc++; next = state->pc + WC_SUBLIST_SKIP(code); } - if (wc_code(code) != WC_SUBLIST) { + if (wc_code(code) != WC_SUBLIST || + WC_SUBLIST_TYPE(code) == WC_SUBLIST_END) { /* We've skipped to the end of the list, not executing * * the final pipeline, so don't perform error handling * * for this sublist. */ -- Peter Stephenson Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070