Open
Description
Environment as in #109. The direct purpose would be to have the Bel REPL be a program, and (in Bel tradition) be a small program. Something like this:
(def repl ()
(awhen (read (prompt "> "))
(print:bel it)
(repl)))
Not sure it can be made quite that short, but it's an ideal to strive towards.
I also realized that a really good prompt
would listen to keystrokes, not just characters from ins
. In other words, it would listen to essentially another API (or at least not exclusively the ins
character stream), in order to
- Move the cursor around on the input line
- Move through history (up and down)
and no doubt many more functions of essentially rlwrap
.
(Hm, another issue with the example code above: I want it to abort on EOF/^D and the like, but not on empty string.)
Metadata
Metadata
Assignees
Labels
No labels