Module Async_interactive
val interactive : bool Core.ref
val print_string : string -> unit Async.Deferred.t
These
print*
functions only print when!interactive
.
val print_endline : string -> unit Async.Deferred.t
val printf : ('r, unit, string, unit Async.Deferred.t) Core.format4 -> 'r
val prints : string -> 'a -> ('a -> Async.Sexp.t) -> unit Async.Deferred.t
val print_s : Async.Sexp.t -> unit Async.Deferred.t
val ask_dispatch_gen : f:(string -> ('a, string) Core.Result.t) -> string -> 'a Async.Deferred.t
module Choice : sig ... end
val ask_dispatch_with_help : ?show_options:bool -> ?show_help:bool -> string -> 'a Choice.t list -> 'a Async.Deferred.t
ask_dispatch_gen question choices
displaysquestion
and gets user input to select one of thechoices
. At most once choice can be thedefault
choice.
val ask_yn : ?default:bool -> string -> bool Async.Deferred.t
val ask_ynf : ?default:bool -> ('a, unit, string, bool Async.Deferred.t) Core.format4 -> 'a
val arithmetic_challenge_exn : ?red:unit -> unit -> unit Async.Deferred.t
This will prompt the user to solve a math problem and exit if they fail.
red
will make the prompt print in red the the screen to make it more visually loudThis will raise if no input or incorrect input is given
val show_file : ?pager:string -> ?msg:string -> file:string -> unit -> unit Async.Deferred.t
These
show*
functions print even whennot !interactive
.
val show_string_with_pager : ?pager:string -> string -> unit Async.Deferred.t
val with_writer_to_pager : ?pager:string -> unit -> f:(Async.Writer.t -> unit Async.Deferred.t) -> unit Async.Deferred.t
module Job : sig ... end