From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9053 invoked from network); 2 Jun 1999 08:30:49 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jun 1999 08:30:49 -0000 Received: (qmail 10660 invoked by alias); 2 Jun 1999 08:30:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6433 Received: (qmail 10649 invoked from network); 2 Jun 1999 08:30:37 -0000 Message-Id: <9906020803.AA37683@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: PATCH: pws-19: document minor syntactic innovation In-Reply-To: ""Bart Schaefer""'s message of "Tue, 01 Jun 1999 17:44:32 DFT." <990601174432.ZM11100@candle.brasslantern.com> Date: Wed, 02 Jun 1999 10:03:01 +0200 From: Peter Stephenson "Bart Schaefer" wrote: > On Jun 1, 11:56am, Peter Stephenson wrote: > } Subject: PATCH: pws-19: document minor syntactic innovation > } > } I should note that things like ${"foo"} only work by accident: you'll find, > } for example, that ${"foo"%bar} doesn't work. That would require swallowing > } nulled out quotes at another point in paramsubst(), which I hinted at > } before. I didn't do this because I didn't see a use for it, but maybe it's > } more consistent that way? > > If it's messy, I think it could be left out, but yes, it is more consistent > that way. This is the patch below; ${"foo"%bar} will now work. There are still probably lots of other possible places, but I don't think it's worth searching for them; if it seems sensible to allow quotes there, someone will notice at some point. > } +Note that double quotes may appear around nested quotations, in which case > > Perhaps "nested expansions" rather than "nested quotations"? Yes, I'll put this onto the list of minor tweaks I have to do. I've got the second description of subscripts (outside a nested quotation) wrong, though the first (directly onto a parameter name) is now correct. > The full effect of the (@) changes? It's pretty simple, really. Yeah, right. --- Src/subst.c.inull Tue Jun 1 09:38:34 1999 +++ Src/subst.c Wed Jun 2 09:54:59 1999 @@ -1168,6 +1168,8 @@ } idend = s; + while (INULL(*s)) + s++; if ((colf = *s == ':')) s++; -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy