Skip to content
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

Support for double asterisk matches ** like bash globbing #85

Open
ssbarnea opened this issue Apr 4, 2022 · 1 comment
Open

Support for double asterisk matches ** like bash globbing #85

ssbarnea opened this issue Apr 4, 2022 · 1 comment

Comments

@ssbarnea
Copy link

ssbarnea commented Apr 4, 2022

It is not clear from the REAME if this library supports ** in matching patterns. That feature is extremely important for some use cases because foo/*/*.yml is expected to match only one folder deep, while using foo/**/*.yml is expected to go recursively.

Basically ** includes the directory separator while simple one does not. Is this supported? If not it should be stated as it one of the most popular globbing features.

Apparently https://github.com/microsoft/vscode-json-languageservice/blob/main/src/utils/glob.ts implementations supports that.

Reference: https://stackoverflow.com/questions/32604656/what-is-the-glob-character

@Krinkle
Copy link

Krinkle commented Apr 4, 2022

I use this library for qunit, in both source and tests, with the ** pattern (sometimes known as a "globstar"). Downstream we integrate with Node.js 10+ on Linux, macOS and Windows.

The following tests show how the feature works. Do one of the cases resemble what you're looking for?
https://github.com/terkelg/tiny-glob/blob/v0.2.9/test/glob.js#L58-L74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants