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

Re: zsh-3.1.2-zefram4



Andrew Main wrote:
> Precedence.  ^ binds tighter than /, | and so on.  ~ binds looser than
> anything except |.  You made a ^ immediately after a ( bind looser
> than *anything*, which made "(^foo|bar)" and "((|)^foo|bar)" behave
> differently.

Now I remember what was hiding in `I've forgotten exactly what I did'.

> >`(foo~bar)BAZ' is actually treated as
> >> `fooBAZ~barBAZ', rather than the exclusion being properly localised.
> >?????? How could it possibly mean anything else?
> 
> It matters when what follows the parentheses has more than one way to
> match.  This includes the case of having two negations in the pattern or,
> and this is the killer, a negation inside a loop.  Consider "(*~foo)b*"
> versus "*b*~foob*" -- "foobb" should match the former ("foob" matches
> "(*~foo)") but not the latter.

I've got it now.  Maybe I can even broadly see how to fix it.

-- 
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