Commit c12013e
authored
feat: add brace expansion support for glob patterns (#368)
Adds `{a,b}` brace expansion support to glob pattern handling, enabling
patterns like `./**/{bin,Scripts}/python{,.exe}` to work as search
paths.
## Changes
- **Brace expansion** in `pet-fs/src/glob.rs`: expands `{a,b}` groups
before passing patterns to the `glob` crate (which doesn't support
braces natively)
- **Safety cap**: expansion limited to 1024 patterns to prevent
exponential blowup
- **Progress logging**: trace-level logs during glob expansion showing
pattern, match count, and elapsed time
- **Robust detection**: `is_glob_pattern()` correctly identifies brace
patterns (requires matched `{...}` pair with comma, scans all groups)
- **JSONRPC docs**: documented brace expansion syntax and example in
`searchPaths`
- **Comprehensive tests**: 27 new tests covering edge cases, cap
behavior, filesystem integration, and performance
Fixes #3661 parent c86c74b commit c12013e
2 files changed
+622
-21
lines changed
0 commit comments