Something went wrong. Try again.
OCaml port of Linenoise forked from patrick.sirref.org/bruit
Something went wrong. Try again.
12345678910111213141516171819(** {! Bruit} is a port of the C library {{:https://github.com/antirez/linenoise} Linenoise} to OCaml. It is not as feature complete as the library, contributions are very welcome.
The main entry point to the library is {! bruit}. *)
type history = string -> string list(** The history callback that provides the user with the current line and expects a list of history items to scroll through using the arrow keys. *)
type result = String of string option | Ctrl_c
val bruit : ?complete:(string -> string list) -> ?history:history -> string -> result(** [bruit ?complete prompt] reads from [stdin] and returns the read string if any, and on [ctrl+c] returns {! Ctrl_c}.
@param complete Used for completions, defaults to [None]. *)