From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1034 invoked from network); 23 May 1999 15:43:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 May 1999 15:43:19 -0000 Received: (qmail 3885 invoked by alias); 23 May 1999 15:43:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6335 Received: (qmail 3878 invoked from network); 23 May 1999 15:43:13 -0000 Message-Id: <9905231515.AA16080@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: pws-19: minor syntactic innovation Date: Sun, 23 May 1999 17:15:41 +0200 From: Peter Stephenson Just thought of a trivial way to take a lot of grief out of parameter substitution. This patch makes the following valid: ${${${${(f)"$(typeset)"}:#*local *\=*}%%\=*}##* } replacing the equivalent but grotesquer "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }" Since you got nothing when you did that before, I don't see how it can break anything. The key point is that quotation of a substitution is already tested for by looking at whether it begins with a quoted $, not by whether the parent substitution is quoted. --- Src/subst.c.qt Fri May 21 09:14:43 1999 +++ Src/subst.c Sun May 23 17:07:33 1999 @@ -976,7 +976,9 @@ zerr("bad substitution", NULL, 0); return NULL; } - } else + } else if (INULL(*s)) + s++; + else break; } globsubst = globsubst && !qt; @@ -999,6 +1001,8 @@ idbeg = val; copied = 1; *s = sav; + while (INULL(*s)) + s++; v = (Value) NULL; } else if (aspar) { if ((v = getvalue(&s, 1))) { -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy