Is there a method to enable/add these kinds of features in readline to the OCaml toplevel?
I find 2 options that work very well for me:
Another simple way I found is to use the
rlwrap for line editing support: https://www.systutorials.com/docs/linux/man/1-rlwrap/
To start the OCaml toplevel with
$ rlwrap ocaml
#!/bin/sh exec rlwrap /usr/bin/ocaml "$@"