mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 10:52:12 +03:00
ac096d85ae
/* is giving us something with an extra `txt` face wrapped around it, which interacts poorly with wet gates. An explicit cast fixes it.
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
:: Kiln: Merge local desk from (optionally-)foreign one
|
|
::
|
|
:::: /hoon/merge/hood/gen
|
|
::
|
|
/? 310
|
|
/* help-text %txt /gen/hood/merge/help/txt
|
|
=, clay
|
|
::
|
|
|%
|
|
+$ beaky [knot knot knot ~]
|
|
+$ sorc ?([bek=beaky ~] [her=@p sud=@tas ~])
|
|
--
|
|
::
|
|
::::
|
|
::
|
|
:- %say
|
|
|= $: [now=@da eny=@uvJ bek=beak]
|
|
[arg=[?(~ sorc [syd=$@(desk beaky) sorc])] cas=case gem=?(germ %auto)]
|
|
==
|
|
=* our p.bek
|
|
|^ :- %kiln-merge
|
|
^- $@(~ [syd=desk her=ship sud=desk cas=case gem=?(germ %auto)])
|
|
?- arg
|
|
~ ((slog (turn `wain`help-text |=(=@t leaf+(trip t)))) ~)
|
|
[@ @ ~]
|
|
=+(arg [sud ?.(=(our her) her (sein:title p.bek now her)) sud (opt-case da+now) gem])
|
|
::
|
|
[^ ~]
|
|
=+ (pars bek.arg)
|
|
[dez ?.(=(our who) who (sein:title p.bek now who)) dez (opt-case caz) gem]
|
|
::
|
|
[* @ @ ~]
|
|
:- (pars-src syd.arg)
|
|
=+(arg [her sud (opt-case da+now) gem])
|
|
::
|
|
[* ^ ~]
|
|
:- (pars-src syd.arg)
|
|
=+((pars bek.arg) [who dez (opt-case caz) gem])
|
|
==
|
|
++ opt-case |=(a=case ?:(=(*case cas) a cas)) :: override
|
|
++ pars |=(a=beaky `[[who=ship dez=desk caz=case] *]`(need (de-beam a)))
|
|
++ pars-src
|
|
|= syd=$@(desk beaky)
|
|
?@ syd syd
|
|
=+ (pars syd)
|
|
~| [%into-foreign who `path`syd]
|
|
?>(=(our who) dez)
|
|
--
|