added different password prompt mode

This commit is contained in:
Philip C Monk 2014-11-05 17:40:18 -05:00
parent 0c1037cbeb
commit 55fa6d0408
7 changed files with 43 additions and 40 deletions

View File

@ -114,7 +114,7 @@
[%res p=span] ::
[%cmd p=char] ::
== == ::
++ term-line ,[p=cord q=(list cord) r=(list tark)] ::
++ term-line ,[p=[p=cord q=prom] q=(list cord) r=(list tark)]
++ tark ?(tank [%stem p=tank q=tank]) ::
:::::::: :: dill tiles
++ bein :: terminal control
@ -379,20 +379,20 @@
?: &(?=(^ q.q.yar) =(/ hux.u.q.q.yar))
%= u.q.q.yar
hyt [+(p.hyt) [%$ q.hyt]]
pot (trip p.q.sih)
pol (met 3 p.q.sih)
buy %text
pot (trip p.p.q.sih)
pol (met 3 p.p.q.sih)
buy q.p.q.sih
==
%_ bed
bul 0
bus 0
but ~
buy %text
buy q.p.q.sih
hux /
hiz 0
hyt [+(p.hyt) [%$ q.hyt]]
pot (trip p.q.sih)
pol (met 3 p.q.sih)
pot (trip p.p.q.sih)
pol (met 3 p.p.q.sih)
==
::
%sage :: write a jamfile

View File

@ -804,8 +804,7 @@
|= [cof=cafe vax=vase gen=twig]
=+ puz=(mule |.((~(mint ut p.vax) [%noun gen])))
?- -.puz
| ~& [%maim-fail p.puz]
(flaw cof p.puz)
| (flaw cof p.puz)
& %+ (coup cof) (mock [q.vax q.p.puz] (mole ska))
|= val=*
`vase`[p.p.puz val]

View File

@ -37,11 +37,11 @@
::
++ next
|= txt=cord
^- [[cord (list cord)] _+>.$]
^- [[[cord prom] (list cord)] _+>.$]
?- sat
%begin
:_ +>.$(sat %his)
:- 'Your ship: ~'
:- ['Your ship: ~' %text]
%- lore %- crip
"""
Do you have a ship and a ticket? If not, please ask
@ -68,7 +68,7 @@
%pawn "submarines"
==
:_ ^+ +>.$ +>.$(his (rash txt fed:ag), sat %tic)
:- 'Your ticket: ~'
:- ['Your ticket: ~' %text]
%- lore %- crip
"""
@ -87,7 +87,7 @@
::
%tic
:_ +>.$(tic (rash txt fed:ag), sat %eny)
:- 'Entropy: '
:- ['Entropy: ' %pass]
%- lore %- crip
"""
@ -98,7 +98,7 @@
::
%eny
:_ +>.$(eny (rash txt (boss 256 (more gon qit))), sat %lag)
:- 'Language: '
:- ['Language: ' %text]
%- lore %- crip
"""
@ -119,9 +119,9 @@
;~(plug low low)
?. ?=(%duke -.q.ges)
:_ +>.$(p.ges (rash txt par), sat %name)
['Name: ' ~]
[['Name: ' %text] ~]
:_ +>.$(p.ges (rash txt par), sat %form)
:- 'Form: '
:- ['Form: ' %text]
%- lore %- crip
"""
@ -139,10 +139,9 @@
=+ nam=(rash txt (boss 256 (more gon qit)))
=+ gos=?-(-.q.ges %earl [%earl nam], %king [%king nam])
:_ +>.$(q.ges gos, sat %done)
['' ~]
[['' %text] ~]
::
%form
^- [[cord (list cord)] _+>.$]
=+ ^= par
;~ pose
(jest %anon)
@ -152,14 +151,14 @@
==
=+ fom=(rash txt par)
?+ fom !!
%anon [['' ~] +>.$(q.ges [%duke %anon ~], sat %done)]
%anon [[['' %text] ~] +>.$(q.ges [%duke %anon ~], sat %done)]
%punk
:_ +>.$(q.ges [%duke %punk *sect ''], sat %pname)
['Handle: ' ~]
[['Handle: ' %text] ~]
?(%lady %lord)
=+ wat=?-(fom %lady [%lady *whom], %lord [%lord *whom])
:_ +>.$(q.ges `gcos`[%duke wat], sat %year)
:- 'Year you were born: '
:- ['Year you were born: ' %text]
%- lore %- crip
"""
@ -186,7 +185,7 @@
::
%pname
:_ +>.$(q.ges [%duke %punk *sect (rash txt loon)], sat %psect)
:- 'Banner: %'
:- ['Banner: %' %text]
%- lore %- crip
"""
@ -226,7 +225,7 @@
(jest %black)
(jest %orange)
==
:- ['' ~]
:- [['' %text] ~]
%= +>.$
q.ges [%duke %punk ((hard sect) (rash txt par)) q.p.q.ges]
sat %done
@ -238,7 +237,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):'
:- ['Location (e.g. us/94103):' %text]
%- lore %- crip
"""
@ -265,7 +264,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: %'
:- ['Banner: %' %text]
%- lore %- crip
"""
@ -308,7 +307,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: ' ~]
[['First name: ' %text] ~]
::
%fname
?> ?=(%duke -.q.ges)
@ -317,7 +316,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): ' ~]
[['Middle name (or blank): ' %text] ~]
::
%mname
?> ?=(%duke -.q.ges)
@ -327,7 +326,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): ' ~]
[['Nickname/handle (or blank): ' %text] ~]
::
%nname
?> ?=(%duke -.q.ges)
@ -337,7 +336,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: ' ~]
[['Last name: ' %text] ~]
::
%lname
?> ?=(%duke -.q.ges)
@ -346,7 +345,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] ~]
::
%done !!
==
@ -488,7 +487,9 @@
[%done +>.$]
==
==
=^ res +>.$ ^- [[pot=cord tak=(list cord)] _+>.$] (next(sat sot) '')
=^ res +>.$
^- [[pot=[cord prom] tak=(list cord)] _+>.$]
(next(sat sot) '')
:_ +>.$
%+ welp
:~ [ost %pass /in %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]]
@ -504,7 +505,9 @@
=+ sih=((hard sign) sih)
?: ?=([%in ~] pax)
?. ?=(%rush +<.sih) `+>.$
=^ res +>.$ ^- [[pot=cord tak=(list cord)] _+>.$] (next p.sih)
=^ res +>.$
^- [[pot=[cord prom] tak=(list cord)] _+>.$]
(next p.sih)
?: ?=(%done sat)
(done ost)
:_ +>.$

View File

@ -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) :: prompts
pot=(map span ,[cord prom]) :: prompts
var=(map term vase) :: variables
== ::
++ gift ::
@ -358,11 +358,12 @@
:(slop !>(%rush) !>(%term-line) !>(prompt) !>(~) tan)
::
++ prompt
^- @t
^- [cord prom]
?^ act
=+ por=(~(get by pot) u.act)
?^ por u.por
(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~)
[(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 +388,7 @@
?. ?=(?(%rust %rush) +<.sih) +>.$
?: ?=(%prompt p.sih)
?: (~(has by pip) cil) +>.$
=. pot (~(put by pot) cil (cord q.sih))
=. pot (~(put by pot) cil (,[cord prom] q.sih))
(blab ping)
%- blab
?: (~(has by pip) cil)

View File

@ -141,7 +141,7 @@
%line :: command entered
=. r.tel
:_ r.tel
stem/[leaf/(trip p.tel) leaf/(trip p.jof)]
stem/[leaf/(trip p.p.tel) leaf/(trip p.jof)]
?: =('\\' (end 3 1 p.jof))
$(jof [%cmd (rsh 3 1 p.jof)])
(send %txt -:!>(*cord) p.jof)
@ -165,7 +165,7 @@
?+ +<.sih !!
%nice +>.$
?(%rust %rush)
=. p.q.sih ?^(q.q.sih p.tel p.q.sih) :: XX prompt hack
=. p.q.sih ?^(q.q.sih p.tel p.q.sih) :: XX prompt hack
%_ +>.$
mow (welp (spam q.sih) mow)
tel [p.q.sih (weld q.q.sih q.tel) (weld r.q.sih r.tel)]

View File

@ -14,7 +14,7 @@
|%
++ json
%- jobe
:~ [%prompt %s p.tel]
:~ [%prompt %s p.p.tel]
[%history %a (turn q.tel |=(a=cord [%s a]))]
:+ %lines %a
%- zing ^- (list (list ^json))

View File

@ -1 +1 @@
,[p=cord q=(list cord) r=(list ?(tank [%stem p=tank q=tank]))]
,[p=[p=cord q=prom] q=(list cord) r=(list ?(tank [%stem p=tank q=tank]))]