开发者

How to 'fix' the SML/NJ interactive system to use Arrow Keys

I'm having some trouble using SML/NJ interactive system, namely, that when I try to use my arrow keys (either left or right to make a correction in the expression I've typed, up to repeat the last expression), my Terminal prints codes. (e.g. ^[[A for up^[[D for left, etc.). While I can still use the system, it makes it very tedious.

I've looked around in开发者_开发技巧 Control.Compiler, is there something I'm missing? For whatever its worth, I'm using the Mac Terminal.

Thanks ^_^


Another option is rlwrap.

rlwrap sml


Try this. You can use socat to add readline support to many things:

socat READLINE EXEC:sml

I just realized you're on OS X. socat does seem to be available for OS X, although I have not tested it (this does work on Linux).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜