line-read: suggestions, keys for the caller, initial input; 0.1.2
#:suggester shows a suggestion after the input, dimmed, as fish does. Right, C-f, End and C-e at the end accept it; M-f, C-Right and M-Right one word. #:command-key? hands keys to the caller as (LineKey key input), with the input erased. line-read and simulate-line take #:initial. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dc8a3325b8
commit
3021b14aac
7 changed files with 198 additions and 38 deletions
|
|
@ -38,6 +38,7 @@
|
|||
(match (line-read ed term (styled "λ> " [(StyleFg (Ansi 2)) StyleBold]) #:continuation (Some ".. "))
|
||||
((LineText text) (println (str "read: " (written text))) (go))
|
||||
(LineCancelled (go))
|
||||
(LineEof unit)))
|
||||
(LineEof unit)
|
||||
((LineKey _ _) (go))))
|
||||
(ignore (line-history-save ed history))
|
||||
0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue