From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2628 invoked from network); 15 Feb 2001 06:17:49 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Feb 2001 06:17:49 -0000 Received: (qmail 17463 invoked by alias); 15 Feb 2001 06:17:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13479 Received: (qmail 17451 invoked from network); 15 Feb 2001 06:17:41 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Zsh hackers list" Subject: RE: More incompatibility :-) RE: PATCH: 3.1.9-dev-8: Re: Word splitting in zsh Date: Thu, 15 Feb 2001 09:17:38 +0300 Message-ID: <000001c09716$fe7662e0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > > The two possible solutions to this are (1) make ${=...} behave the way > > Andrej says is "logical", so that e.g. with shwordsplit turned off, in > > ${=x+${y}} no word splitting would happen at all (because it's not on > > in $y, even though it's on for $x; or (2) figure out how to reset the > > value of mult_spbreak to 0 during $(...) (mult_shwsplit is ignored if > > mult_spbreak is 0). > > > > (1) actually means removing mult_spbreak and mult_shwsplit entirely; I > > put them in because I thought to do otherwise would be too great a > > behavior change from the way zsh works without the patch. > > I'd go for the original patch, plus (1). Almost certainly if there are > side effects we won't find out until the patch is in place anyway. > Ehh ... I did not mean it actually. My concern was that in ${=$(...)} the `=' must not affect what happens inside of $(...). What I believe should happen in case of ${x+${y}} - first, value is computed. It is either $x or $y - without any wordsplitting. Then `=' is applied to the result. It is different from just turning wordsplitting on - consider ${=${${foo}[2]}} where foo is array. Here internal ${foo} should not be wordsplitted, else it is hard to get predictable result. -andrej