Flexmasa.Console
Print messages, and prompt user input from the terminal.
type t = {
color : Internal_pervasives.bool;
buffer : Flexmasa.Internal_pervasives.Buffer.t;
channel : Lwt_io.output_channel;
with_timestamp : Internal_pervasives.bool;
formatter : Stdlib.Format.formatter;
}
val make : Internal_pervasives.bool -> Internal_pervasives.bool -> t
val pp : Stdlib.Format.formatter -> t -> Internal_pervasives.unit
val cli_term : Internal_pervasives.unit -> t Cmdliner.Term.t
Cmdliner
.Term.t which configures the console interaction (e.g. the "--color"
option).
val say :
< application_name : Internal_pervasives.string ; console : t.. > ->
Easy_format.t ->
(Internal_pervasives.unit, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
val sayf :
< application_name : Internal_pervasives.string ; console : t.. > ->
(Stdlib.Format.formatter ->
Internal_pervasives.unit ->
Internal_pervasives.unit) ->
(Internal_pervasives.unit, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
module Prompt : sig ... end
Create interactive prompts.
val display_errors_of_command :
< application_name : Internal_pervasives.string ; console : t.. > ->
?should_output:Internal_pervasives.bool ->
< err : Internal_pervasives.string Internal_pervasives.list
; out : Internal_pervasives.string Internal_pervasives.list
; status : Unix.process_status.. > ->
(Internal_pervasives.bool, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
Display the results of a command if it fails (see Process_result
.t).