From 3459ae7f86cc8a2dad7440f012bb3a19c0585294 Mon Sep 17 00:00:00 2001 From: gregstallings Date: Wed, 23 Oct 2013 13:53:26 +0200 Subject: .functions: Add `tre` shorthand Closes #249. --- .functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.functions b/.functions index 79255f1..e78f855 100644 --- a/.functions +++ b/.functions @@ -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 +} -- cgit v1.2.3