Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-3.1.2-zefram4



just got back...

Andrew Main wrote:
> Peter's KSH_GLOB patch is included, but I backed out a lot of the changes.
> I'd like to have options affect as little as possible, preferably just one
> thing each: KSH_GLOB in this version *only* affects the interpretation
> of parens preceded by the magic characters (in fact, the option is
> only tested on one line of the source).  Parens *not* preceded by the
> magic characters are unaffected by the option.  Glob qualifies are also
> unaffected: that `-', mandatory with KSH_GLOB and forbidden without,
> was just too nasty to use.

The idea was that with the ksh and zsh models being incompatible
anyway, it was asking for trouble trying to mix them.  If you write
correct ksh scripts it won't be a problem, though, so it's fine by me.

> I also backed out the special handling of `(^...)', which changed
> the semantics of `^' in an extremely non-obvious way.  You can use
> `(^(...))' to invert the whole group.

?? It didn't have any semantics before, it didn't work at all inside
parentheses.  I can't remember what I did now (which is a bad sign),
but what's wrong with the meaning `negate the following' that it needs
the extra parentheses?

> This turned up a very old
> bug in the exclusion handling: `(foo~bar)BAZ' is actually treated as
> `fooBAZ~barBAZ', rather than the exclusion being properly localised.

?????? How could it possibly mean anything else?  What are parentheses
supposed to mean, anyway?  (foo|bar)BAZ is fooBAZ|barBAZ and in the
same way (foo~bar)BAZ is fooBAZ~barBAZ.  Or are you just referring to
the way it's evaluated in practice (which is as you say and could
therefore probably be simplified, but that doesn't make it a bug)?

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +39 50 844536
WWW:  http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
 



Messages sorted by: Reverse Date, Date, Thread, Author