B0_cli.Memo
B0_memo
interaction.
val pp_leveled_feedback :
?sep:unit B0_std.Fmt.t ->
?op_howto:B0_zero.Op.t B0_std.Fmt.t ->
show_op:B0_std.Log.level ->
show_ui: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 ~show_spawn_ui ~show_success ~level
ppf
formats memo feedback on ppf
followed by sep
iff something is printed (defaults to B0_std.Fmt.flush_nl
).
B0_std.Log.level.Quiet
formats nothingB0_std.Log.level.Debug
report all operations with B0_zero_conv.Op.pp_line
.show_ui
is the level at which any completed operation gets logged with B0_zero_conv.Op.pp_ui
.show_op
is the level at which any completed operation gets logged with B0_zero_conv.Op.pp_line_and_ui
The formatter op_howto
should format a way to got more information about an operation, default to B0_std.Fmt.nop
.
val b0_dir :
?opts:string list ->
?docs:string ->
?doc:string ->
?doc_none:string ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
B0_std.Fpath.t option Cmdliner.Term.t
b0_dir ~doc_none ~docs ~doc ~env
is a cli interface for specifying a b0 directory.
opts
are the cli options to specify it, defaults to ["b0-dir"]
.docs
is where the option is documented, defaults to Cmdliner.Manpage.s_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 b0_dir_env
.val get_b0_dir :
cwd:B0_std.Fpath.t ->
root:B0_std.Fpath.t ->
b0_dir:B0_std.Fpath.t option ->
B0_std.Fpath.t
get_b0_dir ~cwd ~root ~b0_dir
determines a b0 directory. If b0_dir
is Some d
then this is Fpath.(cwd // d)
. If None
then this is Fpath.(root / b0_dir_name)
.
val find_dir_with_b0_dir : start:B0_std.Fpath.t -> B0_std.Fpath.t option
find_dir_with_b0_dir ~start
finds the first directory starting with start
that has a b0_dir_name
directory. None
is returned if none could found or if start
is relative.
cache_dir_name
is ".cache"
the default cache directory name in the b0
directory.
val cache_dir :
?opts:string list ->
?docs:string ->
?doc:string ->
?doc_none:string ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
B0_std.Fpath.t option Cmdliner.Term.t
cache_dir ~doc_none ~docs ~doc ~env
is a cli interface for specifying a b0 cache directory.
opts
are the cli options to specify it, default to ["cache-dir"]
.docs
is where the option is documented, defaults to Cmdliner.Manpage.s_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 cache_dir_env
.val get_cache_dir :
cwd:B0_std.Fpath.t ->
b0_dir:B0_std.Fpath.t ->
cache_dir:B0_std.Fpath.t option ->
B0_std.Fpath.t
get_cache_dir ~cwd ~b0_dir ~cache_dir
determines a cache directory. If cache_dir
is Some d
then this is Fpath.(cwd // d)
. If None
then this is Fpath.(b0_dir / cache_dir)
.
trash_dir_name
is ".trash"
the default trash directoy name in the b0
directory.
val get_trash_dir :
cwd:B0_std.Fpath.t ->
b0_dir:B0_std.Fpath.t ->
trash_dir:B0_std.Fpath.t option ->
B0_std.Fpath.t
get_trash_dir ~cwd ~b0_dir ~trash_dir
dtermiens a trash directory. If trash_dir
is Some d
then this is Fpath.(cwd // d
. If None
then this is Fpath.(b0_dir /trash_dir)
.
val log_file :
?opts:string list ->
?docs:string ->
?doc:string ->
?doc_none:string ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
B0_std.Fpath.t option Cmdliner.Term.t
log_file ~doc_none ~docs ~doc ~env
is a cli interface for specifing a b0 log file.
opts
are the cli options to specify it, defaults to ["log-file"]
.docs
is where the option is documented, defaults to Cmdliner.Manpage.s_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 cache_dir_env
.val get_log_file :
cwd:B0_std.Fpath.t ->
b0_dir:B0_std.Fpath.t ->
log_file:B0_std.Fpath.t option ->
B0_std.Fpath.t
get_log_file ~cwd ~b0_dir ~log_file
determines a log file. If log_file
is Some f
then this is Fpath.(cwd // f)
. If None
then this is Fpath.(b0_dir /log_file)
.
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_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_env
.get_jobs ~jobs
determines a maximal number of spawns. If jobs is None
then B0_std.Os.Cpu.logical_count
is used.
val hash_fun :
?opts:string list ->
?docs:string ->
?doc:string ->
?doc_none:string ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
(module B0_std.Hash.T) option Cmdliner.Term.t
hash_fun
is a cli interface for specfiying hash function used for caching.
opts
are the cli options to specify it, defaults to ["hash-fun"]
.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 hash_fun_env
.val get_hash_fun :
hash_fun:(module B0_std.Hash.T) option ->
(module B0_std.Hash.T)
get_hash_fun ~hash_fun
determines a hash function. If hash_fun
is None
then B0_std.Hash
is used.
module Log : sig ... end
B0_memo.Log