Skip to content

A terrible reimplementation of the tree utility application

License

Notifications You must be signed in to change notification settings

Bubichoo-Teitichoo/terrible-tree

Repository files navigation

Terrible Tree

A modern approach to the old tree command. This was born out of pure boredom and transformed into a useful tool that replaced the plain tree command as well as ls on Windows.

Usage

Here are a few examples how to run this application

# ls equivalent
terrible-tree --depth 1
# maximum depth, only directories
terrible-tree --dirs
# maximum depth of 4, only directories
terrible-tree --dirs --depth 4
# maximum depth of 4, only python files
terrible-tree --depth 4 -f *.py

Replace ls and/or tree in Windows PowerShell

Open your PowerShell profile ...

nvim $profile

... and add the following lines to it


function ls_alias {
    terrible-tree --depth 1
}

Set-Alias -Name ls -Value ls_alias -Option AllScope
Set-Alias -Name tree -Value terrible-tree -Option AllScope

Nice to Knows

  • When using the -f/--filter on Windows using Wildcard be aware that cmd and powershell expand wildcard in the search-pattern if they find matching files, which may lead to weird errors.