|
From: | Matt Welland |
Subject: | Re: How to get a useful repl with Chicken 5? |
Date: | Thu, 30 Jan 2020 11:49:54 -0700 |
How about: rlwrap csi
It has been good to me, saving the history into ~/.csi_history
On 1/30/20 12:01 PM, Matt Welland wrote:
Line editing and saving history make using a repl much more productive for me. With chicken 4 I was able to get a useful repl with something like this sequence of calls:(import extras) ;; might not be needed?
(import readline)
(import apropos)
;; my imports here ...
(install-history-file (get-environment-variable "HOME") ".some_history")
(current-input-port (make-readline-port "someprog> "))(repl)
I've tried linenoise but don't see how to save the history:
(import linenoise)
(set-history-length! 300)
(load-history-from-file historyf)
(current-input-port (make-linenoise-port))
(repl)
;; (save-history-to-file historyf) ;; doesn't work :(
I've read the docs on linenoise and breadline but I'm not seeing how to get a useful editable repl.
Any pointers or suggestions would be appreciated.--
Complexity is your enemy. Any fool can make something complicated.It is hard to keep things simple. - Richard Branson.
[Prev in Thread] | Current Thread | [Next in Thread] |