mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 18:16:30 +03:00
chat-cli: update tab-complete to static gall
This commit is contained in:
parent
bcd94868cb
commit
3f31904595
@ -351,7 +351,7 @@
|
||||
%det (edit +.dat.act)
|
||||
%clr [~ all-state]
|
||||
%ret obey
|
||||
%tab (tab +.act)
|
||||
%tab (tab +.dat.act)
|
||||
==
|
||||
:: +tab-list: static list of autocomplete entries
|
||||
++ tab-list
|
||||
@ -378,14 +378,14 @@
|
||||
==
|
||||
++ tab
|
||||
|= pos=@ud
|
||||
^- (quip move _this)
|
||||
^- (quip card state)
|
||||
?. =(';' (snag 0 buf.state.cli))
|
||||
[~ this]
|
||||
[~ all-state]
|
||||
=+ (get-id:auto pos (tufa buf.state.cli))
|
||||
=/ needle=term
|
||||
(fall id '')
|
||||
?: &(!=(pos 1) =(0 (met 3 needle)))
|
||||
[~ this] :: autocomplete empty command iff user at start of command
|
||||
[~ all-state] :: autocomplete empty command iff user at start of command
|
||||
=/ options=(list (option:auto tank))
|
||||
(search-prefix:auto needle tab-list)
|
||||
=/ advance=term
|
||||
@ -394,13 +394,13 @@
|
||||
(trip (rsh 3 (met 3 needle) advance))
|
||||
=/ send-pos
|
||||
(add pos (met 3 (fall forward '')))
|
||||
=| moves=(list move)
|
||||
=| moves=(list card)
|
||||
=? moves ?=(^ options)
|
||||
[(tab:sh-out options) moves]
|
||||
=| fxs=(list sole-effect:sole-sur)
|
||||
|-
|
||||
?~ to-send
|
||||
[(flop moves) this]
|
||||
[(flop moves) all-state]
|
||||
=^ char state.cli
|
||||
(~(transmit sole-lib state.cli) [%ins send-pos `@c`i.to-send])
|
||||
%_ $
|
||||
|
Loading…
Reference in New Issue
Block a user