Repository navigation
POSIX character classes match in globs, as bash - #1280
Merged
Merged
Conversation
…sses # Conflicts: # packages/rust/tests/path_table_cli_e2e.rs # packages/rust/tests/path_table_globs.rs
thekevinscott
enabled auto-merge
October 5, 2026 18:21
…sses # Conflicts: # packages/rust/src/matcher.rs # packages/rust/src/scanner.rs # packages/rust/tests/path_table_globs.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1267
POSIX character classes inside brackets now match as bash does, on path-tables and on config
[[table]] glob/ignore. globset has no[:name:]syntax, so a bracket holding one is rewritten into plain ranges before compiling:[[:digit:]]→[0-9].alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit; negation with!or^.-after a class is literal, a range ending in a class ([x-[:digit:]]) matches nothing./(./pc[[:punct:]]*.mddoes not reachpc/).caf[![:digit:]].mdmatchescafé.md,caf[[:digit:]].mddoes not. Divergence from bash in a UTF-8 locale: a non-ASCII letter such aséis not in[[:alpha:]]/[[:alnum:]]here, though bash counts it.Compared against
bash -O globstar -O nullglob(dotglob off) on a /tmp fixture across 15 patterns ([[:digit:]],[[:upper:]]*,[![:digit:]],[[:punct:]]*with\ ] - ! ^names,[^[:alnum:]]*,**/[[:digit:]].md,[[:foo:]1],[x-[:digit:]], ...). Identical except for directory rows (files-only divergence).E2E Verification
packages/python/e2e-attestations/<branch>.jsonreceipt written ifpackages/pythonchanged (just e2e-attest-python)packages/ts/e2e-attestations/<branch>.jsonreceipt written ifpackages/tschanged (just e2e-attest-ts)just e2e-attest-python,just e2e-attest-ts,cargo test --workspace --features cliChangelog / Migrations
<root>/<pkg>/changelog.d/for each changed package<root>/<pkg>/migrations.d/for each changed package