|
($) [Cmdliner.Term] |
f $ v is a term that evaluates to the result of applying
the evaluation of v to the one of f .
|
(&) [Cmdliner.Arg] |
f & v is f v , a right associative composition operator for
specifying argument terms.
|
A |
app [Cmdliner.Term] |
|
array [Cmdliner.Arg] |
array sep c splits the argument at each sep (defaults to ',' )
character and converts each substring with c .
|
B |
bool [Cmdliner.Arg] |
bool converts values with bool_of_string .
|
C |
char [Cmdliner.Arg] |
char converts values by ensuring the argument has a single char.
|
choice_names [Cmdliner.Term] |
choice_names is a term that evaluates to the names of the commands
that are children of the main command.
|
cli_error [Cmdliner.Cmd.Exit] |
cli_error is 124 , an exit status for command line parsing
errors.
|
cli_parse_result [Cmdliner.Term] |
cli_parse_result t is a term that evaluates to:
`Ok v if t evaluates to Ok v ., `Error `Parse with the error message e
if t evaluates to Error (`Msg e) .
|
cli_parse_result' [Cmdliner.Term] |
|
const [Cmdliner.Term] |
const v is a term that evaluates to v .
|
conv [Cmdliner.Arg] |
conv ~docv (parse, print) is an argument converter
parsing values with parse and printing them with
print .
|
conv' [Cmdliner.Arg] |
conv' is like val-conv but the Error case has an unlabelled
string.
|
conv_docv [Cmdliner.Arg] |
conv_docv c is c 's documentation meta-variable.
|
conv_parser [Cmdliner.Arg] |
conv_parser c is the parser of c .
|
conv_printer [Cmdliner.Arg] |
conv_printer c is the printer of c .
|
D |
default_error_exits [Cmdliner.Term] |
|
default_exits [Cmdliner.Term] |
|
defaults [Cmdliner.Cmd.Exit] |
|
dir [Cmdliner.Arg] |
dir converts a value with the identity function and checks
with Sys.file_exists and Sys.is_directory
that a directory with that name exists.
|
doc_alts [Cmdliner.Arg] |
doc_alts alts documents the alternative tokens alts
according the number of alternatives.
|
doc_alts_enum [Cmdliner.Arg] |
doc_alts_enum quoted alts is doc_alts quoted (List.map fst alts) .
|
doc_quote [Cmdliner.Arg] |
doc_quote s quotes the string s .
|
E |
enum [Cmdliner.Arg] |
enum l p converts values such that unambiguous prefixes of string names
in l map to the corresponding value of type 'a .
|
env_info [Cmdliner.Term] |
env_info ~docs ~doc var describes an environment variable
var .
|
env_var [Cmdliner.Arg] |
|
escape [Cmdliner.Manpage] |
escape s escapes s so that it doesn't get interpreted by the
documentation markup language.
|
eval [Cmdliner.Cmd] |
|
eval [Cmdliner.Term] |
eval help err catch argv (t,i) is the evaluation result
of t with command line arguments argv (defaults to Sys.argv ).
|
eval' [Cmdliner.Cmd] |
eval' cmd is c if cmd evaluates to the exit code c .
|
eval_choice [Cmdliner.Term] |
eval_choice help err catch argv (t,i) choices is like Cmdliner.Term.eval
except that if the first argument on the command line is not an option
name it will look in choices for a term whose information has this
name and evaluate it.
|
eval_peek_opts [Cmdliner.Cmd] |
eval_peek_opts version_opt argv t evaluates t , a term made
of optional arguments only, with the command line argv
(defaults to Sys.argv ).
|
eval_peek_opts [Cmdliner.Term] |
eval_peek_opts version_opt argv t evaluates t , a term made
of optional arguments only, with the command line argv
(defaults to Sys.argv ).
|
eval_result [Cmdliner.Cmd] |
|
eval_result' [Cmdliner.Cmd] |
|
eval_value [Cmdliner.Cmd] |
eval ~help ~err ~catch ~env ~argv cmd is the evaluation result
of cmd with:
argv the command line arguments to parse (defaults to Sys.argv ), env the function used for environment variable lookup (defaults
to Sys.getenv )., catch if true (default) uncaught exceptions
are intercepted and their stack trace is written to the err
formatter, help is the formatter used to print help or version messages
(defaults to Format.std_formatter ), err is the formatter used to print error messages
(defaults to Format.err_formatter ).
|
exit [Cmdliner.Term] |
exit ~term_err r is
Stdlib.exit @@ exit_status_of_result ~term_err r
|
exit_info [Cmdliner.Term] |
exit_info ~docs ~doc min ~max describe the range of exit
statuses from min to max (defaults to min ).
|
exit_status [Cmdliner.Term] |
exit_status ~term_err r is
Stdlib.exit @@ exit_status_of_status_result ~term_err r
|
exit_status_cli_error [Cmdliner.Term] |
exit_status_cli_error is 124, an exit status for command line
parsing errors.
|
exit_status_internal_error [Cmdliner.Term] |
exit_status_internal_error is 125, an exit status for unexpected
internal errors.
|
exit_status_of_result [Cmdliner.Term] |
|
exit_status_of_status_result [Cmdliner.Term] |
|
exit_status_success [Cmdliner.Term] |
exit_status_success is 0, the exit status for success.
|
F |
file [Cmdliner.Arg] |
file converts a value with the identity function and
checks with Sys.file_exists that a file with that name exists.
|
flag [Cmdliner.Arg] |
flag i is a bool argument defined by an optional flag
that may appear at most once on the command line under one of
the names specified by i .
|
flag_all [Cmdliner.Arg] |
|
float [Cmdliner.Arg] |
float converts values with float_of_string .
|
G |
group [Cmdliner.Cmd] |
group i ?default cmds is a command with information i that
groups sub commands cmds .
|
I |
info [Cmdliner.Arg] |
info docs docv doc env names defines information for
an argument.
|
info [Cmdliner.Cmd.Env] |
info ~docs ~doc var describes an environment variable
var such that:
doc is the man page information of the environment
variable, defaults to "undocumented" ., docs is the title of the man page section in which the environment
variable will be listed, it defaults to
Cmdliner.Manpage.s_environment ., deprecated , if specified the environment is deprecated and the
string is a message output on standard error when the environment
variable gets used to lookup the default value of an argument.
In doc the documentation markup language
can be used with following variables:
$(env) , the value of var ., The variables mentioned in val-info .
|
info [Cmdliner.Cmd.Exit] |
exit_info ~docs ~doc min ~max describe the range of exit
statuses from min to max (defaults to min ).
|
info [Cmdliner.Cmd] |
info ?sdocs ?man ?docs ?doc ?version name is a term information
such that:
name is the name of the command., version is the version string of the command line tool, this
is only relevant for the main command and ignored otherwise., deprecated , if specified the command is deprecated and the
string is a message output on standard error when the command
is used., doc is a one line description of the command used
for the NAME section of the command's man page and in command
group listings., docs , for commands that are part of a group, the title of the
section of the parent's command man page where it should be listed
(defaults to Cmdliner.Manpage.s_commands )., sdocs defines the title of the section in which the
standard --help and --version arguments are listed
(defaults to Cmdliner.Manpage.s_common_options )., exits is a list of exit statuses that the command evaluation
may produce, defaults to Cmdliner.Cmd.Exit.defaults ., envs is a list of environment variables that influence
the command's evaluation., man is the text of the man page for the command., man_xrefs are cross-references to other manual pages. These
are used to generate a Cmdliner.Manpage.s_see_also section.
|
info [Cmdliner.Term] |
info sdocs man docs doc version name is a term information
such that:
name is the name of the program or the command., version is the version string of the program, ignored
for commands., doc is a one line description of the program or command used
for the NAME section of the term's man page. For commands this
description is also used in the list of commands of the main
term's man page., docs , only for commands, the title of the section of the main
term's man page where it should be listed (defaults to
Cmdliner.Manpage.s_commands )., sdocs defines the title of the section in which the
standard --help and --version arguments are listed
(defaults to Cmdliner.Manpage.s_options )., exits is a list of exit statuses that the term evaluation
may produce., envs is a list of environment variables that influence
the term's evaluation., man is the text of the man page for the term., man_xrefs are cross-references to other manual pages. These
are used to generate a Cmdliner.Manpage.s_see_also section.
doc , man , envs support the documentation
markup language in which the following variables are recognized:
$(tname) the term's name., $(mname) the main term's name.
|
info_code [Cmdliner.Cmd.Exit] |
info_code i is the minimal code of i .
|
int [Cmdliner.Arg] |
int converts values with int_of_string .
|
int32 [Cmdliner.Arg] |
int32 converts values with Int32.of_string .
|
int64 [Cmdliner.Arg] |
int64 converts values with Int64.of_string .
|
internal_error [Cmdliner.Cmd.Exit] |
internal_error is 125 , an exit status for unexpected internal
errors.
|
L |
last [Cmdliner.Arg] |
last a is a term that fails if a 's list is empty and evaluates
to the value of the last element of the list otherwise.
|
list [Cmdliner.Arg] |
list sep c splits the argument at each sep (defaults to ',' )
character and converts each substrings with c .
|
M |
main_name [Cmdliner.Term] |
main_name is a term that evaluates to the main command name;
that is the name of the tool.
|
man_format [Cmdliner.Arg] |
man_format is a term that defines a --man-format option and
evaluates to a value that can be used with Cmdliner.Manpage.print .
|
N |
name [Cmdliner.Cmd] |
|
name [Cmdliner.Term] |
name ti is the name of the term information.
|
nativeint [Cmdliner.Arg] |
nativeint converts values with Nativeint.of_string .
|
non_dir_file [Cmdliner.Arg] |
non_dir_file converts a value with the identity function and checks
with Sys.file_exists and Sys.is_directory
that a non directory file with that name exists.
|
non_empty [Cmdliner.Arg] |
non_empty a is term that fails if a 's list is empty and
evaluates to a 's list otherwise.
|
O |
ok [Cmdliner.Cmd.Exit] |
ok is 0 , the exit status for success.
|
opt [Cmdliner.Arg] |
opt vopt c v i is an 'a argument defined by the value of
an optional argument that may appear at most once on the command
line under one of the names specified by i .
|
opt_all [Cmdliner.Arg] |
opt_all vopt c v i is like Cmdliner.Arg.opt except the optional argument may
appear more than once.
|
P |
pair [Cmdliner.Arg] |
pair sep c0 c1 splits the argument at the first sep character
(defaults to ',' ) and respectively converts the substrings with
c0 and c1 .
|
parser_of_kind_of_string [Cmdliner.Arg] |
parser_of_kind_of_string ~kind kind_of_string is an argument
parser using the kind_of_string function for parsing and kind
to report errors (e.g.
|
pconv [Cmdliner.Arg] |
|
pos [Cmdliner.Arg] |
pos rev n c v i is an 'a argument defined by the n th
positional argument of the command line as converted by c .
|
pos_all [Cmdliner.Arg] |
pos_all c v i is an 'a list argument that holds
all the positional arguments of the command line as converted
by c or v if there are none.
|
pos_left [Cmdliner.Arg] |
pos_left rev n c v i is an 'a list argument that holds
all the positional arguments as converted by c found on the left
of the n th positional argument or v if there are none.
|
pos_right [Cmdliner.Arg] |
pos_right is like Cmdliner.Arg.pos_left except it holds all the positional
arguments found on the right of the specified positional argument.
|
print [Cmdliner.Manpage] |
print ~errs ~subst fmt ppf page prints page on ppf in the
format fmt .
|
R |
required [Cmdliner.Arg] |
required a is a term that fails if a 's value is None and
evaluates to the value of Some otherwise.
|
ret [Cmdliner.Term] |
ret v is a term whose evaluation depends on the case
to which v evaluates.
|
S |
s_arguments [Cmdliner.Manpage] |
|
s_authors [Cmdliner.Manpage] |
|
s_bugs [Cmdliner.Manpage] |
|
s_commands [Cmdliner.Manpage] |
|
s_common_options [Cmdliner.Manpage] |
The COMMON OPTIONS section.
|
s_description [Cmdliner.Manpage] |
|
s_environment [Cmdliner.Manpage] |
|
s_environment_intro [Cmdliner.Manpage] |
|
s_examples [Cmdliner.Manpage] |
|
s_exit_status [Cmdliner.Manpage] |
|
s_files [Cmdliner.Manpage] |
|
s_name [Cmdliner.Manpage] |
|
s_none [Cmdliner.Manpage] |
s_none is a special section named "cmdliner-none" that can be used
whenever you do not want something to be listed.
|
s_options [Cmdliner.Manpage] |
|
s_see_also [Cmdliner.Manpage] |
|
s_synopsis [Cmdliner.Manpage] |
|
some [Cmdliner.Arg] |
some ?none c is like some' but none is described as a
string that will be rendered in bold.
|
some' [Cmdliner.Arg] |
some' ?none c is like the converter c except it returns
Some value.
|
some_error [Cmdliner.Cmd.Exit] |
some_error is 123 , an exit status for indisciminate errors
reported on stderr.
|
string [Cmdliner.Arg] |
string converts values with the identity function.
|
T |
t2 [Cmdliner.Arg] |
|
t3 [Cmdliner.Arg] |
t3 sep c0 c1 c2 splits the argument at the first two sep
characters (defaults to ',' ) and respectively converts the
substrings with c0 , c1 and c2 .
|
t4 [Cmdliner.Arg] |
t4 sep c0 c1 c2 c3 splits the argument at the first three sep
characters (defaults to ',' ) respectively converts the substrings
with c0 , c1 , c2 and c3 .
|
term_result [Cmdliner.Term] |
term_result ~usage t evaluates to
`Ok v if t evaluates to Ok v , `Error `Term with the error message e and usage shown according
to usage (defaults to false ), if t evaluates to
Error (`Msg e) .
|
term_result' [Cmdliner.Term] |
|
V |
v [Cmdliner.Cmd] |
v i t is a command with information i and command line syntax
parsed by t .
|
value [Cmdliner.Arg] |
value a is a term that evaluates to a 's value.
|
vflag [Cmdliner.Arg] |
vflag v [v 0,i 0;…] is an 'a argument defined
by an optional flag that may appear at most once on
the command line under one of the names specified in the i k
values.
|
vflag_all [Cmdliner.Arg] |
|
W |
with_used_args [Cmdliner.Term] |
with_used_args t is a term that evaluates to t tupled
with the arguments from the command line that where used to
evaluate t .
|