~chambln/dots

bea1aebfeb6d02adf4a568502e6ec9d82bf89ff2 — Gregory Chamberlain 14 days ago eba4c9b
sh: Use tab for indentation with shrub file tree

The old 4-spaces output can be achieved portably using the expand(1)
utility like so:

    shrub "$@" | expand -t4

Also, behaviour akin to the '-L LEVEL' option found in tree(1) can be
achieved with sed like so:

    shrub "$@" | sed '/^\t\t/d'    # Like -L 2,
    shrub "$@" | sed '/^\t\t\t/d'  # Like -L 3, etc.
1 files changed, 1 insertions(+), 1 deletions(-)

M sh/bin/shrub
M sh/bin/shrub => sh/bin/shrub +1 -1
@@ 5,7 5,7 @@ descend() (
    cd "$1" >/dev/null 2>&1 && for f in ..?* .[^.]* *; do
        [ -e "$f" ] || continue
        printf '%s\n' "$indent$f"
        [ -d "$f" ] && indent=$indent'    ' descend "$f"
        [ -d "$f" ] && indent=$indent'	' descend "$f"
    done
)