From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9241 invoked from network); 2 Jun 1999 08:58:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jun 1999 08:58:41 -0000 Received: (qmail 13514 invoked by alias); 2 Jun 1999 08:58:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6435 Received: (qmail 13505 invoked from network); 2 Jun 1999 08:58:13 -0000 Message-Id: <9906020830.AA14554@ibmth.df.unipi.it> To: "Zsh hackers list" Subject: Re: sh compatibility RE: PATCH: pws-19: document minor syntactic innovation In-Reply-To: ""Andrej Borsenkow""'s message of "Wed, 02 Jun 1999 12:44:50 DFT." <002c01beacd4$2d055140$21c9ca95@mow.siemens.ru> Date: Wed, 02 Jun 1999 10:30:37 +0200 From: Peter Stephenson "Andrej Borsenkow" wrote: > > This is the patch below; ${"foo"%bar} will now work. > > How compatible with shell is it? > > bor@itsrm2:~%> /sbin/xpg4/sh (for what it's worth :-) > $ foo=bar > $ print ${"foo"} > /sbin/xpg4/sh: ${"foo"}: bad substitution > $ print ${"bar":-com} > /sbin/xpg4/sh: ${"bar":-com}: bad substitution Personally, I'm not too worried about things which give `bad substitution' in other shells --- note that the presence of quotes never gave you that message in zsh before, it simply didn't do anything. We've already got a whole heap of cases which zsh accepts but other shells don't. If we embark on a syntax-tightening exercise, I rather suspect we'll never get to the end. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy