2025-03-14 21:59:59 -06:00
# tre
> Show the contents of the current directory as a tree.
> Respects the `.gitignore` settings by default.
2025-12-16 10:20:31 -07:00
> More information: <https://github.com/dduan/tre#everything-else>.
2025-03-14 21:59:59 -06:00
- Print directories only:
2025-12-16 10:20:31 -07:00
`tre {{[-d|--directories]}}`
2025-03-14 21:59:59 -06:00
- Print JSON containing files in the tree hierarchy instead of the normal tree diagram:
2025-12-16 10:20:31 -07:00
`tre {{[-j|--json]}}`
2025-03-14 21:59:59 -06:00
- Print files and directories up to the specified depth limit (where 1 means the current directory):
2025-12-16 10:20:31 -07:00
`tre {{[-l|--limit]}} {{depth}}`
2025-03-14 21:59:59 -06:00
- Print all hidden files and directories using the specified colorization mode:
2025-12-16 10:20:31 -07:00
`tre {{[-a|--all]}} {{[-c|--color]}} {{automatic|always|never}}`
2025-03-14 21:59:59 -06:00
- Print files within the tree hierarchy, assigning a shell alias to each file that, when called, will open the associated file using the provided `command` (or in `$EDITOR` by default):
2025-12-16 10:20:31 -07:00
`tre {{[-e|--editor]}} {{command}}`
2025-03-14 21:59:59 -06:00
2025-09-14 18:48:49 -06:00
- Print files within the tree hierarchy, excluding all paths that match the provided `regex` :
2025-03-14 21:59:59 -06:00
2025-12-16 10:20:31 -07:00
`tre {{[-E|--exclude]}} {{regex}}`
2025-03-14 21:59:59 -06:00
- Display version:
2025-12-16 10:20:31 -07:00
`tre {{[-V|--version]}}`
2025-03-14 21:59:59 -06:00
- Display help:
2025-12-16 10:20:31 -07:00
`tre {{[-h|--help]}}`