1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-05 03:15:33 +02:00
tldr/pages/common/tre.md
Managor ba6daef39d
*: standardize regex usage (#17328)
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
2025-07-25 08:50:06 +03:00

976 B

tre

Show the contents of the current directory as a tree. Respects the .gitignore settings by default. More information: https://github.com/dduan/tre.

  • Print directories only:

tre --directories

  • Print JSON containing files in the tree hierarchy instead of the normal tree diagram:

tre --json

  • Print files and directories up to the specified depth limit (where 1 means the current directory):

tre --limit {{depth}}

  • Print all hidden files and directories using the specified colorization mode:

tre --all --color {{automatic|always|never}}

  • 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):

tre --editor {{command}}

  • Print files within the tree hierarchy, excluding all paths that match the provided regex:

tre --exclude {{regex}}

  • Display version:

tre --version

  • Display help:

tre --help