diff options
author | gregstallings <gregstallings@gmail.com> | 2013-10-23 13:53:26 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2013-10-23 13:54:00 +0200 |
commit | 3459ae7f86cc8a2dad7440f012bb3a19c0585294 (patch) | |
tree | c13b0c0e7a6bd07cb0957cb4dd8dadfc8af258e6 /.functions | |
parent | 7669dfde2975b1c7391fafe24eadfb92eb687dd2 (diff) | |
download | dotfiles-3459ae7f86cc8a2dad7440f012bb3a19c0585294.tar.gz dotfiles-3459ae7f86cc8a2dad7440f012bb3a19c0585294.tar.bz2 dotfiles-3459ae7f86cc8a2dad7440f012bb3a19c0585294.zip |
.functions: Add `tre` shorthand
Closes #249.
Diffstat (limited to '.functions')
-rw-r--r-- | .functions | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -303,3 +303,11 @@ function np() { git push origin master && \ git push origin master --tags } + +# `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring +# the `.git` directory, listing directories first. The output gets piped into +# `less` with options to preserve color and line numbers, unless the output is +# small enough for one screen. +function tre() { + tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX +} |