You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Respect .gitignore files when listing directory trees inside a git
repository. Uses the `ignore` npm package to parse patterns. Finds the
git root, reads root and nested .gitignore files, and filters entries
before stat'ing for performance. Use --no-gitignore to disable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
--sort <type> Sort the output by type: name, version, mtime,
89
89
ctime, size.
90
+
--gitignore Respect .gitignore files (enabled by default).
91
+
Use --no-gitignore to disable.
90
92
-h, --help Display this message
91
93
--version Display version number
92
94
```
@@ -158,6 +160,7 @@ console.log(result);
158
160
|`dirsOnly`|`false`|`boolean`| List directories only. |
159
161
|`sizes`|`false`|`boolean`| Print the size of each file in bytes along with the name. |
160
162
|`du`|`false`|`boolean`| For each directory, report its size as the accumulation of sizes of all its files and sub-directories. Implies `sizes`. |
163
+
|`gitignore`|`true`|`boolean`| Respect `.gitignore` files when inside a git repository. Use `--no-gitignore` to disable. |
161
164
|`exclude`|`[]`|`RegExp[]`| An array of regex to test each filename against. Matching files will be excluded and matching directories will not be traversed into. To exclude a directory's contents while still showing the directory itself, use a regex that matches the path with a trailing slash (e.g., `/node_modules\//`). |
162
165
|`maxDepth`|`Number.POSITIVE_INFINITY`|`number`| Max display depth of the directory tree. |
163
166
|`reverse`|`false`|`boolean`| Sort the output in reverse alphabetic order. |
0 commit comments