shrub/base/cat/tree.hoon
2015-06-04 15:16:48 -07:00

21 lines
385 B
Plaintext

:: Tree view recursive directory contents
::
:::: /hook/gate/tree/cat
::
!:
::::
::
|= [^ [pax=path fla=$|(~ [%full ~])] ~]
=+ len=(lent pax)
=+ rend=?^(fla dank:ut |=(a=path (dank:ut (slag len a))))
:- %tang
|- ^- tang
=+ ark=;;(arch .^(cy/pax))
=- ?~ q.ark -
[(rend pax) -]
%- zing
%+ turn
(sort (~(tap by r.ark)) aor)
|= [a=@t ~]
^$(pax (welp pax /[a]))