mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
chat-cli: autocomplete on empty command
This commit is contained in:
parent
4acc1fe948
commit
9e6b08bbf1
@ -340,14 +340,16 @@
|
||||
?. =(';' (snag 0 buf.state.cli))
|
||||
[~ this]
|
||||
=+ (get-id:auto pos (tufa buf.state.cli))
|
||||
?~ id
|
||||
[~ this]
|
||||
=/ needle=term
|
||||
(fall id '')
|
||||
?: &(!=(pos 1) =(0 (met 3 needle)))
|
||||
[~ this] :: autocomplete empty command iff user at start of command
|
||||
=/ options=(list (option:auto tank))
|
||||
(search-prefix:auto u.id tab-list)
|
||||
(search-prefix:auto needle tab-list)
|
||||
=/ advance=term
|
||||
(longest-match:auto options)
|
||||
=/ to-send=tape
|
||||
(trip (rsh 3 (met 3 u.id) advance))
|
||||
(trip (rsh 3 (met 3 needle) advance))
|
||||
=/ send-pos
|
||||
(add pos (met 3 (fall forward '')))
|
||||
=| moves=(list move)
|
||||
|
Loading…
Reference in New Issue
Block a user