--include / -i
Info
- The
--include
flag allows you to show only specific files or directories when building the tree.
- You can use glob patterns (wildcards) to match multiple paths.
Usage
Usage
Only python files# Include only Python files
show-file-tree --include "*.py"
All markdown files# Include all Markdown files
show-file-tree --include "*.md"
Example
Example
Files in projectsrc/
tests/
README.md
debug.log
config.yaml
Commandshow-file-tree . --include "*.py" --include "*.md"
Output├── 📁 src
│ └── main.py
└── README.md
Only *.py
and *.md
files are included in the tree.
Tips
Tip
- Multiple
--include
flags can be combined to include several file types.
- Combine with
--exclude
to refine filtering:
Filteringshow-file-tree --include "*.py" --exclude "tests/*"
- Works with
--format md
to generate filtered Markdown documentation.