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.
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
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
- 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.