An implementation of (part of) tree in Bash. (Hopefully this follows the 80/20 rule)
There's also a POSIX-friendly branch with no bashims. Check it out if you prefer shells other than Bash. (That version can't do colors, but otherwise, it's functionally equivalent to this one.)
btree works pretty much like its grownup cousin, tree. It prints out a lightly graphic ASCII tree of one or more directories. It can also do minimal colorization (blue for dirs and green for executables).
btree [-h|--help|-?] [-C] [-L num] [directory ...]
-h|--help|-? Print a man page
-C Colorize the output
-L num Limit the number of sub-directories to visit
Bugs and Limitations
I haven't found any bugs yet, but I'm sure that they're in there. Please let me know if you find one.
tree gives the final item in a directory listing a different bit of ASCII
art than all the other items. It's a nice touch.
btree can't detect the
last item in a given directory as such, so all items look the same. This is
a shame, but I wasn't able to figure out a solution without doing way too
much work for this project.
Credit and copyright
Copyright (c) 2010-2014, Peter Aronoff. See LICENSE for details.