mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-10 10:05:09 +03:00
a539d986a7
In favor of [type] syntax. Turns a bunch of ++ into +$ along the way.
34 lines
721 B
Plaintext
34 lines
721 B
Plaintext
:: ConCATenate file listings
|
|
::
|
|
:::: /hoon/cat/gen
|
|
::
|
|
/? 310
|
|
/+ pretty-file, show-dir
|
|
::
|
|
::::
|
|
::
|
|
:- %say
|
|
|= [^ [arg=(list path)] vane=?(%g %c)]
|
|
=- tang+(flop `tang`(zing -))
|
|
%+ turn arg
|
|
|= pax=path
|
|
^- tang
|
|
=+ ark=.^(arch (cat 3 vane %y) pax)
|
|
?^ fil.ark
|
|
?: =(%sched -:(flop pax))
|
|
[>.^((map @da cord) (cat 3 vane %x) pax)<]~
|
|
[leaf+(spud pax) (pretty-file .^(noun (cat 3 vane %x) pax))]
|
|
?- dir.ark :: handle ambiguity
|
|
~
|
|
[rose+[" " `~]^~[leaf+"~" (smyt pax)]]~
|
|
::
|
|
[[@t ~] ~ ~]
|
|
$(pax (welp pax /[p.n.dir.ark]))
|
|
::
|
|
*
|
|
=- [palm+[": " ``~]^-]~
|
|
:~ rose+[" " `~]^~[leaf+"*" (smyt pax)]
|
|
`tank`(show-dir vane pax dir.ark)
|
|
==
|
|
==
|