B0_cliSourceCommand line interface fragments and logic.
def_conv d is a converter for definitions of type d which knows how to complete them.
output_details is an invocation of B0_std_cli.output_details.
log_format is an invocation of B0_memo_cli.Log.format.
memo_op_query is an invocation of B0_memo_cli.Op.query_cli.
no_pager is an invocation of B0_pager.don't.
val get_excluded_units :
x_units:string list ->
x_packs:string list ->
(B0_unit.Set.t, string) resultget_excluded_units ~x_units ~x_packs is the set of units excluded by the given unit and pack names.
The following use options and the default doc string is generic of the form "use unit".
units defines unit names with -u and --unit.
x_units defines unit names to exclude with -x and --x-unit.
packs defines pack names with -p and --pack.
packs defines pack names to exclude via -X and --x-pack.
The following uses the above functions but with a doc string that indicates that units and packs are selected for build.
units is use_units.
units is use_x_units.
build_packs is use_packs.
build_x_packs is use_x_packs.
The following ones are positional arguments. The doc string is generic of the form "unit to act on, all of them if unspecified".
act_on_units_posn ~first () defines units to act on at position first.
act_on_units_pos0 is act_on_units ~first:0 ().
act_on_units_pos1 is act_on_units ~first:1 ().
act_on_packs_posn ~first () defines packs to act on at position first.
act_on_packs_pos0 is act_on_packs ~first:0 ().
act_on_packs_pos1 is act_on_packs ~first:1 ().
Structured access to _b0 currently lives in B0_build.B0_dir.
val get_b0_dir :
cwd:B0_std.Fpath.t ->
root:B0_std.Fpath.t ->
b0_dir:B0_std.Fpath.t option ->
B0_std.Fpath.tget_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 get_cache_dir :
cwd:B0_std.Fpath.t ->
b0_dir:B0_std.Fpath.t ->
cache_dir:B0_std.Fpath.t option ->
B0_std.Fpath.tget_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).
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.
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.tb0_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_common_optionsdoc 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.b0_dir_env is "B0_DIR".
b0_dir_name is "_b0" the default b0 directory name.