how to repeat last command in OCaml interpreter shell
You can use the improved toplevel utop. Moreover, it includes nice completion capacities.
Use rlwrap
:
rlwrap ocaml
ocaml
itself has no readline support.
You can configure readline using ~/.inputrc
.
For example, you could add such lines to it:
$if ocaml
"\C-o": "()\C-b"
"\C-n": ";;\n"
$endif
Now you can use ctrl-o
and ctrl-n
hotkeys in ocaml
. Just try it.