package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.file/B0_cli/index.html
Module B0_cliSource
Command line interface fragments and logic.
Converters
def_conv d is a converter for definitions of type d which knows how to complete them.
Predefined
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.
Specifying units and packs
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 ().
Metadata keys
B0 directory
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.
optsare the cli options to specify it, defaults to["b0-dir"].docsis where the option is documented, defaults toCmdliner.Manpage.s_common_optionsdocis a doc string.doc_nonedescribes how the value is determined if the term is evaluates toNone.envis a variable that can be used to override the default value, defaults tob0_dir_env.
b0_dir_env is "B0_DIR".
b0_dir_name is "_b0" the default b0 directory name.