mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
added default value to prompts
This commit is contained in:
parent
ceeb424c38
commit
235c594751
@ -114,7 +114,7 @@
|
||||
[%res p=span] ::
|
||||
[%cmd p=char] ::
|
||||
== == ::
|
||||
++ term-line ,[p=[p=cord q=prom] q=(list cord) r=(list tark)]
|
||||
++ term-line ,[p=[p=cord q=prom r=cord] q=(list cord) r=(list tark)]
|
||||
++ tark ?(tank [%stem p=tank q=tank]) ::
|
||||
:::::::: :: dill tiles
|
||||
++ bein :: terminal control
|
||||
@ -378,15 +378,18 @@
|
||||
?~(hyt *hist u.hyt)
|
||||
?: &(?=(^ q.q.yar) =(/ hux.u.q.q.yar))
|
||||
%= u.q.q.yar
|
||||
bul (met 3 r.p.q.sih)
|
||||
bus (met 3 r.p.q.sih)
|
||||
but (rip 3 r.p.q.sih)
|
||||
hyt [+(p.hyt) [%$ q.hyt]]
|
||||
pot (trip p.p.q.sih)
|
||||
pol (met 3 p.p.q.sih)
|
||||
buy q.p.q.sih
|
||||
==
|
||||
%_ bed
|
||||
bul 0
|
||||
bus 0
|
||||
but ~
|
||||
bul (met 3 r.p.q.sih)
|
||||
bus (met 3 r.p.q.sih)
|
||||
but (rip 3 r.p.q.sih)
|
||||
buy q.p.q.sih
|
||||
hux /
|
||||
hiz 0
|
||||
@ -399,18 +402,6 @@
|
||||
%= +>.$
|
||||
mos :_(mos [hen [%give %blit [%sag p.+.sih q.+.sih] ~]])
|
||||
==
|
||||
::S ::
|
||||
::S %save :: write a file
|
||||
::S %= +>.$
|
||||
::S mos :_(mos [hen [%give %blit [%sav p.+.sih q.+.sih] ~]])
|
||||
::S ==
|
||||
::S ::
|
||||
::S %tell (furl (turn p.+.sih |=(a=@t (trip a)))) :: wall of text
|
||||
::S %talk (furl (~(win re p.+.sih) 0 p.q.yar)) :: program output
|
||||
::S %text $(+.sih [%talk %leaf p.+.sih]) :: simple message
|
||||
::S %warn (fume '~' [%leaf p.+.sih]) :: system message
|
||||
::S ?(%init %logo %veer %vega %verb) :: drop-throughs
|
||||
::S +>(mos :_(mos [hen %give +.sih]))
|
||||
?(%init %veer %vega %verb) :: drop-throughs
|
||||
+>(mos :_(mos [hen %give +.sih]))
|
||||
%writ :: file exists
|
||||
@ -544,10 +535,7 @@
|
||||
but (slag bus.u.q.q.yar but.u.q.q.yar)
|
||||
==
|
||||
%r (edit u.q.q.yar(hyr [~ ~]))
|
||||
:: TODO
|
||||
:: %w +>.$(mos :_(mos [hen %pass ~ %b [%limn ~]]))
|
||||
%x +>.$(mos :_(mos (poke %term-in -:!>(*term-in) / %cmd %x)))
|
||||
::S %x +>.$(mos :_(mos [hen %pass ~ %b [%ling ~]]))
|
||||
%y ?: =(0 p.r.q.yar)
|
||||
beep
|
||||
$(kyz [%belt %txt (snag q.r.q.yar r.r.q.yar)])
|
||||
@ -616,10 +604,8 @@
|
||||
[p.hyt.u.q.q.yar [jab ?~(q.hyt.u.q.q.yar ~ +.q.hyt.u.q.q.yar)]]
|
||||
::
|
||||
mos
|
||||
:* ::S [hen %pass ~ %b [%hail ~]]
|
||||
(poke %term-ctrl -:!>(%hail) %hail)
|
||||
:* (poke %term-ctrl -:!>(%hail) %hail)
|
||||
[hen %give [%bbye ~]]
|
||||
::S [hen %pass ~ %b [%line jab]]
|
||||
(poke %term-in -:!>(*term-in) / %line jab)
|
||||
[hen %give [%blit [[%mor ~] ~]]]
|
||||
mos
|
||||
@ -657,7 +643,6 @@
|
||||
::
|
||||
%hail :: refresh
|
||||
+>.$
|
||||
::S +>.$(mos :_(mos [hen %pass ~ %b kyz]))
|
||||
::
|
||||
%harm :: all terms hung up
|
||||
=+ nug=((map duct yard) [[hen (~(get by dug) hen)] ~ ~])
|
||||
|
@ -24,7 +24,7 @@
|
||||
:* :* ost %pass /to-gan %g %mess [our.hid /began] our.hid
|
||||
%began-args !>([his tic eny ges])
|
||||
==
|
||||
(spam %rush %prompt "[waiting...]" %text)
|
||||
(spam %rush %prompt "[waiting...]" %text '')
|
||||
==
|
||||
::
|
||||
++ loon
|
||||
@ -38,11 +38,11 @@
|
||||
::
|
||||
++ next
|
||||
|= txt=cord
|
||||
^- [[[cord prom] (list cord)] _+>.$]
|
||||
^- [[[cord prom cord] (list cord)] _+>.$]
|
||||
?- sat
|
||||
%begin
|
||||
:_ +>.$(sat %his)
|
||||
:- ['Your ship: ~' %text]
|
||||
:- ['Your ship: ~' %text '']
|
||||
%- lore %- crip
|
||||
"""
|
||||
Do you have a ship and a ticket? If not, please ask
|
||||
@ -69,7 +69,7 @@
|
||||
%pawn "submarines"
|
||||
==
|
||||
:_ ^+ +>.$ +>.$(his (rash txt fed:ag), sat %tic)
|
||||
:- ['Your ticket: ~' %text]
|
||||
:- ['Your ticket: ~' %text '']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
::
|
||||
%tic
|
||||
:_ +>.$(tic (rash txt fed:ag), sat %eny)
|
||||
:- ['Entropy: ' %pass]
|
||||
:- ['Entropy: ' %pass '']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
::
|
||||
%eny
|
||||
:_ +>.$(eny (rash txt (boss 256 (more gon qit))), sat %lag)
|
||||
:- ['Language: ' %text]
|
||||
:- ['Language: ' %text 'en']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -120,9 +120,9 @@
|
||||
;~(plug low low)
|
||||
?. ?=(%duke -.q.ges)
|
||||
:_ +>.$(p.ges (rash txt par), sat %name)
|
||||
[['Name: ' %text] ~]
|
||||
[['Name: ' %text ''] ~]
|
||||
:_ +>.$(p.ges (rash txt par), sat %form)
|
||||
:- ['Form: ' %text]
|
||||
:- ['Form: %' %text 'lady']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
=+ nam=(rash txt (boss 256 (more gon qit)))
|
||||
=+ gos=?-(-.q.ges %earl [%earl nam], %king [%king nam])
|
||||
:_ +>.$(q.ges gos, sat %done)
|
||||
[['' %text] ~]
|
||||
[['' %text ''] ~]
|
||||
::
|
||||
%form
|
||||
=+ ^= par
|
||||
@ -152,14 +152,14 @@
|
||||
==
|
||||
=+ fom=(rash txt par)
|
||||
?+ fom !!
|
||||
%anon [[['' %text] ~] +>.$(q.ges [%duke %anon ~], sat %done)]
|
||||
%anon [[['' %text ''] ~] +>.$(q.ges [%duke %anon ~], sat %done)]
|
||||
%punk
|
||||
:_ +>.$(q.ges [%duke %punk *sect ''], sat %pname)
|
||||
[['Handle: ' %text] ~]
|
||||
[['Handle: ' %text ''] ~]
|
||||
?(%lady %lord)
|
||||
=+ wat=?-(fom %lady [%lady *whom], %lord [%lord *whom])
|
||||
:_ +>.$(q.ges `gcos`[%duke wat], sat %year)
|
||||
:- ['Year you were born: ' %text]
|
||||
:- ['Year you were born: ' %text '19']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -186,7 +186,7 @@
|
||||
::
|
||||
%pname
|
||||
:_ +>.$(q.ges [%duke %punk *sect (rash txt loon)], sat %psect)
|
||||
:- ['Banner: %' %text]
|
||||
:- ['Banner: %' %text 'white']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -226,7 +226,7 @@
|
||||
(jest %black)
|
||||
(jest %orange)
|
||||
==
|
||||
:- [['' %text] ~]
|
||||
:- [['' %text ''] ~]
|
||||
%= +>.$
|
||||
q.ges [%duke %punk ((hard sect) (rash txt par)) q.p.q.ges]
|
||||
sat %done
|
||||
@ -238,7 +238,7 @@
|
||||
=+ woh=`whom`[(rash txt dim:ag) *govt *sect *name]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %govt)
|
||||
:- ['Location (e.g. us/94103):' %text]
|
||||
:- ['Location ' %text 'us/94103']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -265,7 +265,7 @@
|
||||
=+ woh=`whom`[p.p.p.q.ges (rash txt par) *sect *name]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %sect)
|
||||
:- ['Banner: %' %text]
|
||||
:- ['Banner: %' %text 'white']
|
||||
%- lore %- crip
|
||||
"""
|
||||
|
||||
@ -308,7 +308,7 @@
|
||||
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges (sect (rash txt par)) *name]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %fname)
|
||||
[['First name: ' %text] ~]
|
||||
[['First name: ' %text ''] ~]
|
||||
::
|
||||
%fname
|
||||
?> ?=(%duke -.q.ges)
|
||||
@ -317,7 +317,7 @@
|
||||
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %mname)
|
||||
[['Middle name (or blank): ' %text] ~]
|
||||
[['Middle name (or blank): ' %text ''] ~]
|
||||
::
|
||||
%mname
|
||||
?> ?=(%duke -.q.ges)
|
||||
@ -327,7 +327,7 @@
|
||||
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %nname)
|
||||
[['Nickname/handle (or blank): ' %text] ~]
|
||||
[['Nickname/handle (or blank): ' %text ''] ~]
|
||||
::
|
||||
%nname
|
||||
?> ?=(%duke -.q.ges)
|
||||
@ -337,7 +337,7 @@
|
||||
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %lname)
|
||||
[['Last name: ' %text] ~]
|
||||
[['Last name: ' %text ''] ~]
|
||||
::
|
||||
%lname
|
||||
?> ?=(%duke -.q.ges)
|
||||
@ -346,7 +346,7 @@
|
||||
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
|
||||
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
|
||||
:_ +>.$(q.ges [%duke wat], sat %done)
|
||||
[['' %text] ~]
|
||||
[['' %text ''] ~]
|
||||
::
|
||||
%done !!
|
||||
==
|
||||
@ -489,7 +489,7 @@
|
||||
==
|
||||
==
|
||||
=^ res +>.$
|
||||
^- [[pot=[cord prom] tak=(list cord)] _+>.$]
|
||||
^- [[pot=[cord prom cord] tak=(list cord)] _+>.$]
|
||||
(next(sat sot) '')
|
||||
:_ +>.$
|
||||
%+ welp
|
||||
@ -507,7 +507,7 @@
|
||||
?: ?=([%in ~] pax)
|
||||
?. ?=(%rush +<.sih) `+>.$
|
||||
=^ res +>.$
|
||||
^- [[pot=[cord prom] tak=(list cord)] _+>.$]
|
||||
^- [[pot=[cord prom cord] tak=(list cord)] _+>.$]
|
||||
(next p.sih)
|
||||
?: ?=(%done sat)
|
||||
(done ost)
|
||||
|
@ -17,7 +17,7 @@
|
||||
==
|
||||
==
|
||||
++ blitz
|
||||
$% [%prompt p=cord q=prom]
|
||||
$% [%prompt p=cord q=prom r=cord]
|
||||
[%tang p=(list tank)]
|
||||
[%txt p=cord]
|
||||
[%zong p=zong]
|
||||
@ -38,7 +38,7 @@
|
||||
==
|
||||
++ idad ,[p=@p q=@t]
|
||||
++ iron
|
||||
$% [%prompt p=cord q=prom]
|
||||
$% [%prompt p=cord q=prom r=cord]
|
||||
[%txt p=cord]
|
||||
[%zongs p=(list zong)]
|
||||
[%users p=users]
|
||||
@ -142,7 +142,7 @@
|
||||
?- -.u.rey
|
||||
%all =+ ^= mof
|
||||
?~ pom ~
|
||||
(send /out %give %rush %prompt '& ' %text)
|
||||
(send /out %give %rush %prompt '& ' %text '')
|
||||
=^ mow +>.^$
|
||||
(poke-zung(pom ~) ost our.hid %mess sat.fal p.u.rey)
|
||||
[(welp mof mow) +>.^$]
|
||||
@ -162,7 +162,7 @@
|
||||
%mess [p.u.rey %chat ~] our.hid %mess !>(q.u.rey)
|
||||
==
|
||||
?: =(pom [~ p.u.rey]) ~
|
||||
(send /out %give %rush %prompt (cat 3 (scot %p p.u.rey) ' ') %text)
|
||||
(send /out %give %rush %prompt (cat 3 (scot %p p.u.rey) ' ') %text '')
|
||||
%who
|
||||
:_ +>.^$
|
||||
%^ send /out %give :+ %rush %tang :_ ~
|
||||
@ -203,7 +203,7 @@
|
||||
=+ ya=(grab t.pax)
|
||||
?+ i.pax !!
|
||||
%out
|
||||
[ost %give %rust %prompt '& ' %text]~
|
||||
[ost %give %rust %prompt '& ' %text '']~
|
||||
%private
|
||||
~
|
||||
%amigos
|
||||
@ -239,7 +239,7 @@
|
||||
%+ welp
|
||||
:+ [ost %pass /cmd-in %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]]
|
||||
[ost %pass /private %g %show [our.hid /chat] you /private]
|
||||
(send /out %give %rush %prompt '& ' %text)
|
||||
(send /out %give %rush %prompt '& ' %text '')
|
||||
mow
|
||||
::
|
||||
++ poke-mess
|
||||
|
@ -15,7 +15,7 @@
|
||||
act=(unit span) :: active child
|
||||
pip=(map span span) :: pipe out->in
|
||||
pop=(map span span) :: pipe in->out
|
||||
pot=(map span ,[cord prom]) :: prompts
|
||||
pot=(map span ,[cord prom cord]) :: prompts
|
||||
var=(map term vase) :: variables
|
||||
== ::
|
||||
++ gift ::
|
||||
@ -357,12 +357,12 @@
|
||||
:(slop !>(%rush) !>(%term-line) !>(prompt) !>(~) tan)
|
||||
::
|
||||
++ prompt
|
||||
^- [cord prom]
|
||||
^- [cord prom cord]
|
||||
?^ act
|
||||
=+ por=(~(get by pot) u.act)
|
||||
?^ por u.por
|
||||
[(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~) %text]
|
||||
:_ %text
|
||||
[(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~) %text '']
|
||||
:_ [%text '']
|
||||
?. &(?=([@ @ @ *] pax) =('0' &3.pax))
|
||||
(rsh 3 1 (spat pax))
|
||||
(rap 3 &1.pax '/' &2.pax '=' ?~(|3.pax ~['> '] ~[(spat |3.pax) '> ']))
|
||||
@ -387,7 +387,7 @@
|
||||
?. ?=(?(%rust %rush) +<.sih) +>.$
|
||||
?: ?=(%prompt p.sih)
|
||||
?: (~(has by pip) cil) +>.$
|
||||
=. pot (~(put by pot) cil (,[cord prom] q.sih))
|
||||
=. pot (~(put by pot) cil (,[cord prom cord] q.sih))
|
||||
(blab ping)
|
||||
%- blab
|
||||
?: (~(has by pip) cil)
|
||||
|
@ -1 +1 @@
|
||||
,[p=[p=cord q=prom] q=(list cord) r=(list ?(tank [%stem p=tank q=tank]))]
|
||||
,[p=[p=cord q=prom r=cord] q=(list cord) r=(list ?(tank [%stem p=tank q=tank]))]
|
||||
|
Loading…
Reference in New Issue
Block a user