When your in the shell it sometimes is nice to see a directory tree. In DOS (Windows) its just a simple Tree command in the directory of interest. See below:
In DOS the following Tree command produces the following directory structure.
Z:\On My Mac\dev\bin>tree
Folder PATH listing for volume Shared Folders
Volume serial number is 00003A66 0000:0064
Z:.
├───branches
│ ├───REL-1.000.01
│ └───REL-1.000.02
├───tags
│ └───PROD-1.000.REV-1.0
└───trunk
This is helpful for documentation, reviewing of a repository,etc. So, I wrote a quick alias for unix and its transportable for all flavors.
function tree { ls -aslR | grep ':$' | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'; }
tree OS/X
<big:jes> 0 [12-20 08:28] ~/scratch/bin (0 Mb)
! tree
|-.svn
|-test
|---.svn
|-----loop
|---sloop
Its a start, building this out as a function instead an alias we can give it a parameter (The intended Path). We'll save that for later.