shrub/gen/cat.hoon
Raymond Pasco 309805f5e7 Merge in Hoon 151
Complicated merge of Hoon 151. This commit is a major sequence point.
2016-02-10 14:03:28 -05:00

34 lines
672 B
Plaintext

:: ConCATenate file listings
::
:::: /hoon/cat/gen
::
// /%%/ls+subdir
// /%/pretty
!:
::::
::
:- %say
|= {^ {arg/(list path)} $~}
=- tang+(flop `tang`(zing -))
%+ turn arg
|= pax/path
^- tang
=+ ark=;;(arch .^(%cy pax))
?^ fil.ark
?: =(%sched -:(flop pax))
[>;;((map ,@da cord) .^(%cx pax))<]~
[leaf+(spud pax) (pretty-file .^(%cx pax))]
?- dir.ark :: handle ambiguity
$~
[rose+[" " `~]^~[leaf+"~" (smyt pax)]]~
::
{{@t $~} $~ $~}
$(pax (welp pax /[p.n.dir.ark]))
::
*
=- [palm+[": " ``~]^-]~
:~ rose+[" " `~]^~[leaf+"*" (smyt pax)]
`tank`(subdir pax dir.ark)
==
==