package ez_cmdliner
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Easy interface to Cmdliner à la Arg.parse with sub-commands
Install
dune-project
Dependency
ocamlpro.github.io
Readme
Changelog
LGPL-2.1-only WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (5)
Authors
Maintainers
Sources
v0.4.3.tar.gz
sha256=a4aaa008bf2bf29189e3c66c9481aab5d2e12b20c0b769a484df5dc07d68961d
doc/ez_cmdliner/Ezcmd/index.html
Module EzcmdSource
include module type of struct include V1.Ezcmd end
Source
val parse :
?name:string ->
?version:string ->
?man:TYPES.block list ->
(string * TYPES.Arg.spec * string) list ->
(string -> unit) ->
string ->
unitSource
val translate :
?docs:string ->
(string * TYPES.Arg.spec * string) list ->
(string list * TYPES.Arg.spec * TYPES.info) listenv ~docs ~doc var describes an environment variable var. 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 Manpage.s_environment.
In doc the documentation markup language can be used with following variables:
$(env), the value ofvar.- The variables mentioned in
info
info docs docv env doc defines information for an argument.
envdefines the name of an environment variable which is looked up for defining the argument if it is absent from the command line. See environment variables for details.docis the man page information of the argument. The documentation language can be used and the following variables are recognized:"$(docv)"the value ofdocv(see below)."$(opt)", one of the options ofnames, preference is given to a long one."$(env)", the environment var specified byenv(if any).
These functions can help with formatting argument values.
docvis for positional and non-flag optional arguments. It is a variable name used in the man page to stand for their value.docsis the title of the man page section in which the argument will be listed. For optional arguments this defaults toManpage.s_options. For positional arguments this defaults toManpage.s_arguments. However a positional argument is only listed if it has both adocanddocvspecified.
Source
val main_with_subcommands :
name:string ->
?version:string ->
?default:TYPES.command ->
doc:string ->
?man:TYPES.block list ->
?topics:(string * Cmdliner.Manpage.block list) list ->
?argv:string array ->
TYPES.command list ->
unit sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>