Yes, I see it as well.
At first I thought both of us were doing something wrong,
but the more I look into it I see it truely is weird.
Your example is quite concise.
Not intending to confuse the thread I add these:
~adresults in 3.
~a results in 1,2, and 3.
~ah* results in 2 and 3 .
~af* results in 1, 2, and 3.
Note:
I was writing this when Jon Posted. @Jon
Yes, ~(an*) results in 1.
@Leo
In all fairness, I note you wrote that you haven't looked at this in detail yet.
I respectfully disagree though that Maths is a proper explanation of the need for parens or brackets as you refer to () characters.
We call it Mathematics or Math here, as I'm a North American.
In fact I never knew British English shortened Mathematics to the pseudo plural Maths before your post.
Well, it's a simple case of the end justifying the means.
~x isn't working and has no explicit meaning, but ~(x) does.
That proves the paren is mathematically necessary ???
If you find time and are curious, look closer at my examples.
There's more wrong here.
I think it's a bug.
I also think Sir Isaac and Steve Hawking would think so too.
That's incorrect. ~x works fine. It will filter out any file called "x" while leaving all other files. (Here x is a single character, not a placeholder for anything.)
Example:
x <-- filtered out
xx <-- not filtered out
a <-- not filtered out
aa <-- not filtered out
~x seems to work fine. It does exactly the same thing as ~(x) as well.
On the other hand:
~xy where you have two (or more) characters after the ~ is ambiguous and may not work the way people assume it does, unless the brackets are added.
Even ~xy works fine if you understand what it does, but you need the brackets to make it do what most people want, which is to exclude a string of characters.
Using brackets to ensure the integrity of a filter makes sense. Maybe the Help file could be made a bit more explicit on this topic. I suspect I'm not the only one who has jumped to invalid conclusions.
Slightly OT Scred.. I suppose it's what you become used to hearing as you grow up but the North American use of math as an abbreviation for mathematics has always sounded wrong to my British educated ear.