--exclude / -e¶
The --exclude
flag allows you to skip specific files or directories when building the tree.
You can use glob patterns (wildcards) to match multiple paths.
Usage¶
Example¶
Files in project¶
Command¶
Output¶
debug.log
and tests/
are excluded from the tree.
Tips¶
- Multiple
--exclude
flags can be combined for fine-grained filtering. - Combine with
--include
to focus on specific file types while ignoring others:
- Works with
--format md
to generate filtered Markdown documentation.