Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBCL REPL use up arrow keys to show history

I have installed SBCL onto OSX through Macports. When inside the REPL, it would be very convenient to be able to use and to iterate through the previous commands (similar to the behavior in bash or Python's REPL).

Is there a way to enable this functionality?

like image 317
cwallenpoole Avatar asked Jan 31 '15 15:01

cwallenpoole


2 Answers

Install rlwrap and then run rlwrap sbcl.

You can get rlwrap through macports or homebrew.

It's pretty much as simple as that.

like image 54
Samuel Edwin Ward Avatar answered Oct 23 '22 16:10

Samuel Edwin Ward


You could also also use Linedit. This is SBCL REPL specific, so it causes problems in other environments (like SLIME).

Or, you can try the SBCL-Readline project. Not sure how this works in SLIME, haven't tried it personally.

Both Uses UFFI to implement the use of C libraries. Just make sure to skim through the source code and change the paths to libraries etc for your system, before trying them out!

like image 3
C. Sederqvist Avatar answered Oct 23 '22 16:10

C. Sederqvist