fix REPL completion

This commit is contained in:
vindarel 2020-10-13 19:20:51 +02:00
parent 514f0599d7
commit f1ec529901
2 changed files with 13 additions and 7 deletions

View file

@ -72,7 +72,7 @@ and use it:
TODO: we will distribute ready-to-use core images.
** With a binary. Use CIEL's own REPL.
** With a binary. Use CIEL's custom REPL.
You don't need anything, just download the CIEL executable and run
its REPL.
@ -85,11 +85,15 @@ TODO: we will distribute ready-to-use core images.
You are dropped into a custom Lisp REPL, freely based on [[https://github.com/hellerve/sbcli][sbcli]].
This REPL is more user friendly than the default SBCL one. It
handles errors gracefully, it is not too verbose and it has readline
capabilities, including multiline input and reset.
This REPL is more user friendly than the default SBCL one:
- it has readline capabilities, meaning that the arrow keys work (!)
and there is a persistent history, like in any shell.
- it has *multiline input* and reset.
- it has *TAB completion* of symbols.
- it handles errors gracefully: you are not dropped into the debugger
and its sub-REPL, you simply see the error message.
# todo: symbol completion is broken?
* Libraries
** Data structures

6
repl.lisp Normal file → Executable file
View file

@ -186,8 +186,6 @@ based on SBCLI")
(declare (ignore start) (ignore end))
(select-completions text (get-all-symbols)))
;; TODO: I don't have completion.
(rl:register-function :complete #'custom-complete)
;; -1 means take the string as one arg
(defvar *special*
@ -264,10 +262,14 @@ based on SBCLI")
(sbcli "" *prompt*)))
(defun repl ()
;; TODO: I don't have completion.
(rl:register-function :complete #'custom-complete)
(if (probe-file *config-file*)
(load *config-file*))
(print *banner*)
(print "hello !!!")
(write-line (str:repeat 80 "-"))
(print-system-info)
(write-line (str:repeat 80 "-"))