Search file contents for a literal text pattern.
Binary files (determined by MIME type) are skipped.
grep(
pattern: string,
path: string | null = null,
glob: string | null = null,
maxCount: number | null = null
): Promise<GrepResult>| Name | Type | Description |
|---|---|---|
pattern* | string | Literal text pattern to search for |
path | string | null | Default: nullBase path to search from (default: null) |
glob | string | null | Default: nullOptional glob pattern to filter files (e.g., "*.py") |
maxCount | number | null | Default: nullOptional cap on the total number of matches returned.
When the cap is hit, results are flagged |