B0_memo_cli
Command line interface fragments and logic.
module File_cache : sig ... end
B0_zero.File_cache
interaction.
module Op : sig ... end
B0_zero.Op
interaction.
module Log : sig ... end
B0_memo_log
interaction
val pp_op_howto : B0_zero.Op.t B0_std.Fmt.t
pp_op_howto
formats instructions on how to get more information about an operation. This is "b0-log --id %d"
.
val pp_leveled_feedback :
?sep:unit B0_std.Fmt.t ->
?op_howto:B0_zero.Op.t B0_std.Fmt.t ->
output_op_level:B0_std.Log.level ->
output_ui_level:B0_std.Log.level ->
level:B0_std.Log.level ->
[ B0_memo.feedback | B0_zero.Exec.feedback ] B0_std.Fmt.t
pp_leveled_feedback ~sep ~op_howto ~output_op_level ~output_ui_level ~level ppf
is formatter for memo feedback:
level
indicates the wanted feedback level, this is typically the current B0_std.Log.level
. The following levels are treated specially (other arguments can be ignored):
B0_std.Log.level.Quiet
formats nothing.B0_std.Log.level.Debug
report all completed operations with B0_zero_conv.Op.pp_line_and_ui
.level >= output_op_level
any completed operation gets logged with B0_zero_conv.Op.pp_line_and_ui
level >= output_ui_ui
any completed operation gets logged with B0_zero_conv.Op.pp_ui
sep
is formatted at the end iff something is formated. Defaults to B0_std.Fmt.cut
.The formatter op_howto
should format a way to got more information about an operation, default to pp_op_howto
.
TODO. It's a bit unclear what "ui" is here.
get_jobs ~jobs
determines a maximal number of spawns. If jobs is None
then B0_std.Os.Cpu.logical_count
is used.
val jobs :
?opts:string list ->
?docs:string ->
?doc:string ->
?doc_none:string ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
int option Cmdliner.Term.t
jobs
is a cli interface for specifying the maximal number of commands to spawn concurrently.
opts
are the cli options to specify it, defaults to ["j";"jobs"]
.docs
is where the option is documented, defaults to Cmdliner.Manpage.s_common_options
doc
is a doc string.doc_none
describes how the value is determined if the term is evaluates to None
.env
is a variable that can be used to override the default value, defaults to jobs_var
.