vtjnash / Glob.jl

Posix-compliant file name pattern matching
Other
125 stars 18 forks source link

support globstar syntax in `FilenameMatch`s #39

Open hhaensel opened 1 month ago

hhaensel commented 1 month ago

This PR is the first part of the steps discussed in #38.

Add support for globstar syntax ("**") in occursin for FilenameMatchs

Currently globstar is only supported in pathname mode, because I first thought that it doesn't make sense if * already matches any character. But now I think it would be useful, e.g. to support patterns like for gitignore. (Shouldn't be too difficult to implement, probably only removing some if clauses)

So happy to discuss this here.

There's a bunch of test cases in 'runtests.jl' (I have refactored the tests a bit by putting them in testsets.)