From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6166 invoked by alias); 27 Jun 2015 22:55:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35643 Received: (qmail 11842 invoked from network); 27 Jun 2015 22:55:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=dtgmcAU4 c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=P5Q6L1DsAAAA:8 a=ynBvNFR4fVsVnBcWLRcA:9 a=CjuIK1q_8ugA:10 Date: Sat, 27 Jun 2015 23:55:08 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Strange regression in zsh-git with redirecting output of 'readonly' Message-ID: <20150627235508.7d0d6b40@ntlworld.com> In-Reply-To: <558F2167.5080902@inlv.org> References: <558F2167.5080902@inlv.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 28 Jun 2015 00:19:19 +0200 Martijn Dekker wrote: > There's a regression in current zsh git version: attempting to > redirecting the output of a "readonly" with assignment argument (i.e. a > potential error message) causes at least three kinds of different and > unpredictable strange behaviour. But in all three cases, the command > fails to work. In zsh 5.0.8 and earlier, all this works fine. Does this fix it? diff --git a/Src/parse.c b/Src/parse.c index 477f8a0..09567fd 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1868,6 +1868,8 @@ par_simple(int *cmplx, int nr) *cmplx = c = 1; nrediradd = par_redir(&r, NULL); p += nrediradd; + if (ppost) + ppost += nrediradd; sr += nrediradd; } else if (tok == ENVSTRING) { char *ptr, *name, *str; pws