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

Re: Difference between ~ except and ^ not in fng



Hi,

2014-05-03 12:38 GMT+02:00 zzapper <david@xxxxxxxxxxxxxx>:
> I'm trying to formulate some examples that show the difference between ~ &
> ^
> But everytime I do I find I can do it with either.

They don't have the same precedence: ^ has high precedence while ~ has
low precedence.

foo/^bar/* and foo/*/*~foo/bar/* mean pretty much the same, except
that the first one is much less verbose.

**/*~*oo/ba* means any path without “oo/ba” in it (including foo/bar),
I'm not sure you can easily do the same thing with ^ (as / has lower
precedence than ^).

Best regards,

-- 
Jérémie



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