Skip to content
Discussion options

You must be logged in to vote

I think you need two globs unfortunately.

The reason why *test* doesn't work is because it doesn't match the basename of footestfoo/foo.foo. That's consistent with GNU grep:

$ grep --include '*test*' -r a ./
./baz/test.baz:a
./bartestbar.bar:a

And the reason why **/*test*/** doesn't work is that a /** suffix implies that the glob should match only the things inside a directory:

// If the glob ends with `/**`, then we should only match everything
// inside a directory, but not the directory itself. Standard globs
// will match the directory. So we add `/*` to force the issue.
if glob.actual.ends_…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fbdb
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants