首先假设你的系统已经安装好homebrew, 若没有安装可参看我之前的博客: mac osx 下的apt-get,yum的代替工具 ----homebrew
安装sbcl
$brew install sbcl
sbcl交互模式下, 输入代码时不支持左右箭头移动光标,比较崩溃.
如下图
$ sbcl
This is SBCL 1.3.14, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* ()^[[D
接下来安装rlwrap
$ brew install rlwrap
rlwrap是命令行输入交互增强工具, 可以解决左右方向键问题和支持历史命令等. 使用以下命令启动sbcl即可
$ rlwrap sbcl
rlwrap的更多技巧可以参考这篇博客: 【rlwrap】让rlwrap工具更加的生动有趣——快捷键的尝试