From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20748 invoked from network); 28 Feb 2000 11:00:55 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Feb 2000 11:00:55 -0000 Received: (qmail 5264 invoked by alias); 28 Feb 2000 11:00:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9900 Received: (qmail 5254 invoked from network); 28 Feb 2000 11:00:47 -0000 Date: Mon, 28 Feb 2000 12:00:41 +0100 (MET) Message-Id: <200002281100.MAA03172@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Sat, 26 Feb 2000 17:48:18 +0000 Subject: Re: Bug with push-line-or-edit and here-documents Bart Schaefer wrote: > push-line-or-edit with a here-document is accepting the command rather than > just pushing it on the editor stack. > > zagzig[21] cat < heredoc> echo this should not be catted > heredoc> > echo this should not be catted <-- Yipes, "cat" ran! > zagzig[21] cat < echo this should not be catted lexrestore() called from parsestr() resets errflag. Bye Sven diff -ru ../z.old/Src/exec.c Src/exec.c --- ../z.old/Src/exec.c Mon Feb 28 10:49:44 2000 +++ Src/exec.c Mon Feb 28 11:59:21 2000 @@ -2553,8 +2553,12 @@ if (t > buf && t[-1] == '\n') t--; *t = '\0'; - if (!qt) + if (!qt) { + int ef = errflag; + parsestr(buf); + errflag = ef; + } s = dupstring(buf); zfree(buf, bsiz); return s; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de