package minicli
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b898d1d568d7bb3a874b63883a4b958be89961f0891642d3404ec35c130b7237
md5=d9aee047e9aa90460a5f6321da3b9273
doc/minicli/CLI/index.html
Module CLI
Exceptions
Initialization
val init : unit -> int * argsCall init before using any of the other funtions (unless you really know what you are doing). let argc, args = CLI.init () in ... will compute argc and transform Sys.argv into the string list args.
Parse mandatory options
val get_int : option_strings -> args -> intread a mandatory int from the command line
val get_char : option_strings -> args -> charread a mandatory char from the command line
val get_string : option_strings -> args -> stringread a mandatory string from the command line
val get_float : option_strings -> args -> floatread a mandatory float from the command line
val get_bool : option_strings -> args -> boolundocumented
val get_set_bool : option_strings -> args -> boolreturn true if flag was present on the command line, false otherwise
val get_reset_bool : option_strings -> args -> boolreturn false if flag was present on the command line, true otherwise
Parse optional options
val get_int_opt : option_strings -> args -> int optionread an optional int from the command line
val get_char_opt : option_strings -> args -> char optionread an optional char from the command line
val get_string_opt : option_strings -> args -> string optionread an optional string from the command line
val get_float_opt : option_strings -> args -> float optionread an optional float from the command line
val get_bool_opt : option_strings -> args -> bool optionundocumented
Parse optional options with a default value
val get_int_def : option_strings -> args -> int -> intread an optional int from the command line, or use the provided default if option was not seen on the command line
val get_string_def : option_strings -> args -> string -> stringread an optional string from the command line, or use the provided default if option was not seen on the command line
val get_char_def : option_strings -> args -> char -> charread an optional char from the command line, or use the provided default if option was not seen on the command line
val get_float_def : option_strings -> args -> float -> floatread an optional float from the command line, or use the provided default if option was not seen on the command line
val get_bool_def : option_strings -> args -> bool -> boolundocumented