filter
cmd/filter
Search file content (grep-like)
Quick Start
filter <pattern> [file...] [options]
At A Glance
Usage
filter <pattern> [file...] [options]
Subcommands
No subcommands.
Flags
| Flag | Type | Description |
|---|---|---|
-after |
int |
Show N lines after match |
-before |
int |
Show N lines before match |
-context |
int |
Show N lines before and after match |
-count |
- |
Only show match count per file |
-files-only |
- |
Only show filenames with matches |
-fixed |
- |
Treat pattern as fixed string, not regex |
-ignore-case |
- |
Case-insensitive search |
-invert |
- |
Invert match (show non-matching lines) |
-line-number |
- |
Show line numbers |
-quiet |
- |
Quiet mode (exit 0 if match found) |
-recursive |
- |
Search directories recursively |
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Runtime/command error |
2 |
Invalid flags/usage |