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

Fix glob negation #2678

Merged
merged 2 commits into from Mar 18, 2024
Merged

Fix glob negation #2678

merged 2 commits into from Mar 18, 2024

Conversation

joeyballentine
Copy link
Member

@joeyballentine joeyballentine commented Mar 14, 2024

Discord link for context: https://discord.com/channels/930865462852591648/930875396277280788/1217655737178656798

Basically, the negate flag wasn't enough. I guess negating doesn't assume you want to match everything that doesnt match the negation by default, so to enable that i had to enable negateall.

Docs for negateall: https://facelessuser.github.io/wcmatch/glob/#negateall. No it wont break regular globs.

Specifically, this enables global pattern negation (which appears to be enabled on glob tester websites). For example, with this you can write !**/*_ab.* instead of **/!(*_ab).*

@joeyballentine joeyballentine changed the title Fix glob negation for directories Fix glob negation Mar 14, 2024
@joeyballentine
Copy link
Member Author

Merging this for now so it does not become stale

@joeyballentine joeyballentine merged commit e7c36a7 into main Mar 18, 2024
14 checks passed
@joeyballentine joeyballentine deleted the fix-negative-globs branch March 18, 2024 15:39
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

Successfully merging this pull request may close these issues.

None yet

1 participant