Skip to content

Commit 792daca

Browse files
docs: add match filter and update extension filter docs
1 parent 429b005 commit 792daca

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Even as a learning project, it already has some pretty handy features:
2424
* **Dig Deeper**: Use `-r` to recurse into subdirectories, or `-L` to cap the depth.
2525
* **Filters**: Quickly isolate just directories (`-d`) or just files (`-D`).
2626
* **Extension Filter**: Hide extensions you don't want to see with `-e` / `--ext` (for example: `--ext zig,md,ts`).
27+
* **Name Match Filter**: Only show entries whose names contain specific text with `-m` / `--match` (for example: `--match test`).
2728
* **Summary Report**: Use `-R` to see a quick count of files and folders after listing.
2829
* **Git Integration**: Use `-g` with `-l` to show Git status indicators in detailed view (`M` modified, `A` added, `D` deleted, `R` renamed, `?` untracked). Note: this only works in detailed mode (`-l`), not in grid mode.
2930

@@ -77,7 +78,8 @@ zl [OPTIONS] [PATH]
7778
| `-p`, `--pure` | Clean output without colors or icons (useful for pipes). |
7879
| `-d`, `--dir` | Only show directories. |
7980
| `-D`, `--no_dir` | Only show files (hide directories). |
80-
| `-e`, `--ext <str>...` | Hide files by extension. Comma-separated is supported, e.g. `--ext zig,go,ts`. |
81+
| `-e`, `--ext <str>...` | Hide files by extension, e.g. `--ext zig,go,ts`. |
82+
| `-m`, `--match <str>...` | Only show names that contain the given text, e.g. `--match test`. |
8183
| `-R`, `--report` | Show a brief summary of file and folder counts. |
8284
| `-g`, `--git` | Show Git status indicators (requires `-l` to work). |
8385
| `-h`, `--help` | Print help message. |
@@ -116,11 +118,12 @@ zl -D
116118

117119
**Exclude some extensions:**
118120
```bash
119-
# hide zig/go/ts files
120121
zl --ext zig,go,ts
122+
```
121123

122-
# same thing, with repeated flags
123-
zl -e zig,go -e ts
124+
**Match by name:**
125+
```bash
126+
zl --match test
124127
```
125128

126129
**Show summary report:**
@@ -143,6 +146,8 @@ zl -lg
143146
* [x] Depth control for recursion (`-L`)
144147
* [x] Clean output mode (`-p`)
145148
* [x] Filter by files or directories (`-d`, `-D`)
149+
* [x] Extension filter (`-e`, `--ext`)
150+
* [x] Name match filter (`-m`, `--match`)
146151
* [x] Smart dynamic grid layout
147152
* [x] Summary report (`-R`)
148153
* [x] Git status integration (`-g`)

0 commit comments

Comments
 (0)