-
-
Save wesbos/1432b08749e3cd2aea22fcea2628e2ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in your .zshrc or .bashrc file | |
# Install `tree` first — brew install tree | |
function t() { | |
# Defaults to 3 levels deep, do more with `t 5` or `t 1` | |
# pass additional args after | |
tree -I '.git|node_modules|bower_components|.DS_Store' --dirsfirst --filelimit 15 -L ${1:-3} -aC $2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@azakordonets since you have a function named
t
, there really is no reason to alias it tot
. I don't see this in my zsh but I believe that's the issue, if you want to use an alias, name the function_t
for example and thenalias t=_t
.Also, it seems like
--filelimit
and-a
are conflicting options, at least when I tried to original function, and it only seems to take one additional parameter after the level parameter, so with these issues in mind, I made the following change: