shrub/gen/cat.hoon

32 lines
661 B
Plaintext
Raw Normal View History

2015-05-28 05:46:58 +03:00
:: ConCATenate file listings
::
2015-09-12 00:15:25 +03:00
:::: /hoon/gen/cat
2015-05-28 05:46:58 +03:00
::
// /%%/ls/subdir
// /%/pretty
2015-05-28 05:46:58 +03:00
!:
::::
::
2015-09-12 03:24:51 +03:00
:- %say
2015-05-28 05:46:58 +03:00
|= [^ [arg=(list path)] ~]
2015-06-17 04:06:58 +03:00
=- tang/(flop `tang`(zing -))
2015-05-28 05:46:58 +03:00
%+ turn arg
|= pax=path
^- tang
=+ ark=;;(arch .^(%cy pax))
2015-09-08 23:15:40 +03:00
?^ fil.ark
2015-06-17 04:06:58 +03:00
?: =(%sched -:(flop pax))
[>;;((map ,@da cord) .^(%cx pax))<]~
2015-05-28 05:46:58 +03:00
[leaf/(spud pax) (pretty-file .^(%cx pax))]
2015-09-08 23:15:40 +03:00
?- dir.ark :: handle ambiguity
2015-05-28 05:46:58 +03:00
~
[rose/[" " `~]^~[leaf/"~" (smyt pax)]]~
[[@t ~] ~ ~]
2015-09-08 23:15:40 +03:00
$(pax (welp pax /[p.n.dir.ark]))
2015-05-28 05:46:58 +03:00
*
=- [palm/[": " ``~]^-]~
:~ rose/[" " `~]^~[leaf/"*" (smyt pax)]
2015-09-08 23:15:40 +03:00
`tank`(subdir pax dir.ark)
2015-05-28 05:46:58 +03:00
==
==