package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0_b00_kit/B00_cli/Memo/index.html
Module B00_cli.Memo
B00.Memo
interaction.
Memo feedback
val pp_leveled_feedback :
?sep:unit B0_std.Fmt.t ->
?op_howto:B000.Op.t B0_std.Fmt.t ->
show_op:B0_std.Log.level ->
show_ui:B0_std.Log.level ->
level:B0_std.Log.level ->
[ B00.Memo.feedback | B000.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.Quiet
formats nothingB0_std.Log.Debug
report all operations withB000_conv.Op.pp_line
.
show_ui
is the level at which any completed operation gets logged withB000_conv.Op.ui
.show_op
is the level at which any completed operation gets logged withB000_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
.
Directories and files
B0 directory
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 toCmdliner.Manpage.s_options
doc
is a doc string.doc_none
describes how the value is determined if the term is evaluates toNone
.env
is a variable that can be used to override the default value, defaults tob0_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.
File cache directory
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 toCmdliner.Manpage.s_options
doc
is a doc string.doc_none
describes how the value is determined if the term is evaluates toNone
.env
is a variable that can be used to override the default value, defaults tocache_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 directory
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)
.
Log file
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 toCmdliner.Manpage.s_options
doc
is a doc string.doc_none
describes how the value is determined if the term is evaluates toNone
.env
is a variable that can be used to override the default value, defaults tocache_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)
.
Memo parameters
Jobs
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 toCmdliner.Manpage.s_options
doc
is a doc string.doc_none
describes how the value is determined if the term is evaluates toNone
.env
is a variable that can be used to override the default value, defaults tojobs_env
.
get_jobs ~jobs
determines a maximal number of spawns. If jobs is None
then B0_std.Os.Cpu.logical_count
is used.
Hash function
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 toCmdliner.Manpage.s_common_options
doc
is a doc string.doc_none
describes how the value is determined if the term is evaluates toNone
.env
is a variable that can be used to override the default value, defaults tohash_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.Xxh3_64
is used.