filemanip icon indicating copy to clipboard operation
filemanip copied to clipboard

GlobPattern: windows path escaping broken?

Open s-trooper opened this issue 9 years ago • 2 comments

Hi, seems nit quite right for me.

> "a\\b" ~~ "a\\*"
False 

but

> "a/b" ~~ "a/*"
True

s-trooper avatar Jul 21 '15 13:07 s-trooper

You should escape \ in glob patterns.

> "a\\b" ~~ "a\\\\*"
True

epsilonidiot avatar Jul 22 '15 11:07 epsilonidiot

you are right but what about that

>"a/b" ~~ "*/b"
True
>"a\\b" ~~ "*\\\\b"
False
>"a\\b" ~~ "*\\b"
False

at the end i would like to have that

find always (filePath ~~? "./d*/*/*.xml") "." 

have the same or close behavior as linux/python glob

ls "./d*/*/*.xml"
glob("./d*/*/*.xml") 

s-trooper avatar Jul 22 '15 14:07 s-trooper