【发布时间】:2012-11-05 02:06:17
【问题描述】:
每次我在解释器中使用这些键时,我都会不断收到类似这样的符号:
[[D^[[C
我在 ZSH 中使用 Linux Mint 12,但是在带有 bash 的 Ubuntu 中我得到了相同的结果。 另外,ssh 也是一样的。
【问题讨论】:
标签: ocaml interpreter arrow-keys ledit
每次我在解释器中使用这些键时,我都会不断收到类似这样的符号:
[[D^[[C
我在 ZSH 中使用 Linux Mint 12,但是在带有 bash 的 Ubuntu 中我得到了相同的结果。 另外,ssh 也是一样的。
【问题讨论】:
标签: ocaml interpreter arrow-keys ledit
股票OCaml顶层没有内置行编辑。我使用rlwrap:
$ cat bin/ocaml
#!/bin/sh
exec rlwrap /usr/local/bin/ocaml "$@"
在我看来,在没有这样的情况下使用顶层是相当痛苦的!
其他可能性是在 emacs 下运行顶层(我认为这是一个流行的选择),或者使用 utop。 utop我没用过,不过听起来很酷。
【讨论】:
另一种选择是使用:
ledit ocaml
虽然我自己更喜欢 utop。
【讨论】:
alias ocaml="ledit ocaml"