Deewiant / glob

Haskell library for glob matching
https://deewiant.iki.fi/projects/glob/
Other
25 stars 8 forks source link

** has inconsistent behavior with hidden directories #29

Closed travv0 closed 5 years ago

travv0 commented 5 years ago

match (compile "haskell/sbu/**/dist/*") "haskell/sbu/.stack-work/dist/test" (trying to use ** to match one level) returns False but match (compile "haskell/**/dist/*") "haskell/sbu/.stack-work/dist/test" (using ** to match two levels) returns True.

Is this a bug or am I missing something about how globs work?

travv0 commented 5 years ago

Looked through the code and realized it's because of the hidden directory. So never mind about that! On the other hand, should the second snippet be returning False then?

Deewiant commented 5 years ago

Yes, the second result definitely looks like a bug. This is supposed to be what the matchDotsImplicitly option in MatchOptions controls.

Deewiant commented 5 years ago

Released as 0.10.0.