From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13241 invoked from network); 29 May 1999 08:31:37 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 May 1999 08:31:37 -0000 Received: (qmail 10732 invoked by alias); 29 May 1999 08:31:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6367 Received: (qmail 10725 invoked from network); 29 May 1999 08:31:31 -0000 From: "Bart Schaefer" Message-Id: <990529083119.ZM27236@candle.brasslantern.com> Date: Sat, 29 May 1999 08:31:19 +0000 In-Reply-To: <9905231515.AA16080@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "PATCH: pws-19: minor syntactic innovation" (May 23, 5:15pm) References: <9905231515.AA16080@ibmth.df.unipi.it> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: PATCH: pws-19: minor syntactic innovation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 23, 5:15pm, Peter Stephenson wrote: } Subject: PATCH: pws-19: minor syntactic innovation } } 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 *\=*}%%\=*}##* } Hooray, hooray, hooray. About six times a year I try that kind of syntax (having forgotten it doesn't work), grumble to myself, and do it some other way. Thank you. I always assumed there was some incredibly hairy parsing thing that had to be done to consume the quoted string at that point. } replacing the equivalent but grotesquer } } "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }" Perfect. I'm tempted to try something similar in 3.0.6 ... except because of this: } 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. If I put this patch of yours into 3.0.6, will it behave differently than it does in 3.1.5 (e.g., because of the mult_isarr change)? If so, I think I'd rather not introduce differing new behaviors in the two branches. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com