ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
courtesy of this site: http://www.centerkey.com/tree/
As a bonus, most (all?) of the sed commands are also usable in vi's ex mode (the : prompt).
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
courtesy of this site: http://www.centerkey.com/tree/