package cmdlang-stdlib-runner
A basic execution runner for cmdlang based on stdlib.arg
Install
dune-project
Dependency
Authors
Maintainers
Sources
cmdlang-0.0.10.tbz
sha256=ca68da238799022810373d060bbd528d1de7687e8f8b4a89450c0bb33a41897d
sha512=7e223e3b02da4132f3638c83cad2b0b5bd3f672d777ad09a1d956db6bbed8d93b6125d754fcc0d970b16ac8150be08f9c3ae6a066868e2128351f9e049fefe53
doc/cmdlang-stdlib-runner/Cmdlang_stdlib_runner/Positional_state/index.html
Module Cmdlang_stdlib_runner.Positional_state
Source
A mutable state that will collect parsing information for positional arguments.
This state is compiled from the AST representation of the command line and is used to collect and store the values of positional arguments during the calls to Arg.anon_fun
.
Source
type t = {
pos : One_pos.packed array;
pos_all : Pos_all.packed option;
mutable current_pos : int;
}
Source
val make :
pos:One_pos.packed list ->
pos_all:Pos_all.packed option ->
t Cmdlang_ast.Ast.or_error_msg
Update the positional state based on the parsing of the next positional argument in the command line.
Usage and help documentation
This section is dedicated to create contents to display for --help
messages, such as in:
Usage: my_command [OPTIONS] [ARGUMENTS]
ARGUMENTS:
<arg> description of arg1
<arg> description of arg2
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page