(** {! 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 hint = string -> (string * Fmt.style) option (** The hint callback takes the current input and a user can return, optionally, extra information to fill in on the current line. *) type result = String of string option | Ctrl_c val bruit : ?complete:(string -> string list) -> ?history:history -> ?hint:hint -> 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]. *)