Added tree view (-t)

This commit is contained in:
Dylan Araps 2019-02-25 22:07:50 +02:00
parent a9fd0b8dfb
commit ba1fb58e16
1 changed files with 6 additions and 0 deletions

6
pash
View File

@ -39,6 +39,9 @@ pw_show() {
pw_list() { pw_list() {
shopt -s globstar nullglob shopt -s globstar nullglob
[[ $tree ]] &&
printf '%s\n' "pash"
for pwrd in **; do for pwrd in **; do
[[ -d $pwrd ]] && [[ -d $pwrd ]] &&
dir=/ dir=/
@ -55,6 +58,9 @@ pw_list() {
dir= dir=
fi fi
done done
[[ $tree ]] &&
printf '└%s\b┘\n' "${nest//\//──┴}"
} }
pw_gen() { pw_gen() {