mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 20:02:51 +03:00
17 lines
367 B
Plaintext
17 lines
367 B
Plaintext
!:
|
|
:: /===/bin/tree/hoon
|
|
|= ^
|
|
|= [pax=path fla=$|(~ [%full ~])]
|
|
=- ~[te/-]~
|
|
=+ len=(lent pax)
|
|
=+ rend=?~(fla |=(a=path +:(spud (slag len a))) spud)
|
|
|- ^- wain
|
|
=+ ark=;;(arch .^(cy/pax))
|
|
=- ?~ q.ark -
|
|
[(crip (rend pax)) -]
|
|
%- zing
|
|
%- turn :_ |=(a=@t ^$(pax (weld pax `path`/[a])))
|
|
%- sort :_ aor
|
|
%- turn :_ |=([a=@t ~] a)
|
|
(~(tap by r.ark))
|