module Readline: Readline
type
completer = left:string -> right:string -> string list
module History: sig
.. end
A mutable variable representing the history.
val input_line : ?history:History.t ->
?prompt:string ->
?text:string -> ?tab_completion:completer -> unit -> string option
Returns None
on EOF
(i.e. the user typed ctrl + d
)
history
: the mutable value used as a history. The deault value is
History.default
. If you don't want any history ou should use History.null
prompt
: the string to use as a prompt (default value ">"
)
tab_completion
: the function use to complete on tab. By default there
is no completion.
val input_line_eof : ?history:History.t ->
?prompt:string ->
?text:string -> ?tab_completion:completer -> unit -> string
val password : ?prompt:string -> unit -> string option
Prompts for a password. Displays '*' instead of typed characters.
Returns None
on EOF
val confirm : ?prompt:string -> string -> bool
Prompts for an answer. Returns true if the answer equals the given string
(ignoring case), false otherwise.
val choice : (string * 'a) list -> 'a option