-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GlobStar support -- **
matches any number of levels
#19
Comments
So it looks like this is not going to be implemented. |
Why? It hasn't been implemented yet, but that doesn't mean me or someone else might not find the time in the future. |
This package extends glob.jl to add a a recursive ** pattern |
Sadly eglob doesn't seem to install using specified instructions in README. |
Eglob.jl is stale. |
My last look was that might not handle multiple |
I tried implementing ** support. @test occursin(fn"**/*.png"d, "c.png")
@test occursin(fn"**/*.png"d, "a/c.png")
@test occursin(fn"**/*.png"d, "a/b/c.png")
@test occursin(fn"/**/*.png"d, "/c.png")
@test occursin(fn"/**/*.png"d, "/a/c.png")
@test occursin(fn"/**/*.png"d, "/a/b/c.png")
@test occursin(fn"**/*.png"d, "/c.png")
@test occursin(fn"**/*.png"d, "/a/c.png")
@test occursin(fn"**/*.png"d, "/a/b/c.png")
@test !occursin(fn"/**/*.png"d, "c.png")
@test !occursin(fn"/**/*.png"d, "a/c.png")
@test !occursin(fn"/**/*.png"d, "a/b/c.png") |
Two more important ones: @test occursin(fn"**.png"d, "c.png")
@test !occursin(fn"**.png"d, "a/b/c.png") |
Found one edge case that fails. Pattern with ending "**" currently don't match all files. |
But that can probably be solved by replacing ending |
With that modification, also the following tests pass @test occursin(fn"**"d, "c.png")
@test occursin(fn"**"d, "a/c.png")
@test occursin(fn"**"d, "/a/c.png")
@test occursin(fn"/**"d, "/a/c.png")
@test occursin(fn"/a/**"d, "/a/c.png")
@test !occursin(fn"/b/**"d, "/a/c.png")
@test !occursin(fn"/**"d, "a/c.png") |
This is a thing in bash's glob, and in the
.gitignore
pattern matching.it is really useful e.g. for getting to the bottom of a directory hierachy.
https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html
The text was updated successfully, but these errors were encountered: