| Name | Type | Description |
|---|---|---|
pattern* | str | Glob include pattern. |
Compile a grep include-glob into a matcher with ripgrep-like semantics.
Provides one shared include-glob behavior for every backend so the same
grep(..., glob=...) call closely mirrors ripgrep for common include
patterns, whether or not ripgrep is installed:
Patterns without a / match the basename at any depth.
Example: *.py matches src/app/main.py.
Patterns containing a / match the path relative to the grep search
root, with ** support.
Example: src/**/*.py matches src/app/main.py.
A leading / anchors the pattern to the search root; it narrows the match
rather than widening it.
Example: /*.py matches top.py but not src/app/main.py.
Exclusion/negation patterns (a leading !) are not supported: the ! is
treated literally rather than inverting the match, so results for such
patterns can diverge from rg --glob '!...'.