Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sh compatibility RE: PATCH: pws-19: document minor syntactic innovation
- X-seq: zsh-workers 6435
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: sh compatibility RE: PATCH: pws-19: document minor syntactic innovation
- Date: Wed, 02 Jun 1999 10:30:37 +0200
- In-reply-to: ""Andrej Borsenkow""'s message of "Wed, 02 Jun 1999 12:44:50 DFT." <002c01beacd4$2d055140$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"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 <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author