package commons

  1. Overview
  2. Docs
type arg_spec_full = Arg.key * Arg.spec * Arg.doc
type cmdline_options = arg_spec_full list
type options_with_title = string * string * arg_spec_full list
type cmdline_sections = options_with_title list
val parse_options : cmdline_options -> Arg.usage_msg -> string array -> string list
val usage : Arg.usage_msg -> cmdline_options -> unit
val short_usage : Arg.usage_msg -> short_opt:cmdline_options -> unit
val long_usage : Arg.usage_msg -> short_opt:cmdline_options -> long_opt:cmdline_sections -> unit
val arg_align2 : cmdline_options -> cmdline_options
val arg_parse2 : cmdline_options -> Arg.usage_msg -> (unit -> unit) -> string list
type flag_spec = Arg.key * Arg.spec * Arg.doc
type action_spec = Arg.key * Arg.doc * action_func
and action_func = string list -> unit
type cmdline_actions = action_spec list
exception WrongNumberOfArguments
val mk_action_0_arg : (unit -> unit) -> action_func
val mk_action_1_arg : (string -> unit) -> action_func
val mk_action_2_arg : (string -> string -> unit) -> action_func
val mk_action_3_arg : (string -> string -> string -> unit) -> action_func
val mk_action_4_arg : (string -> string -> string -> string -> unit) -> action_func
val mk_action_n_arg : (string list -> unit) -> action_func
val options_of_actions : string ref -> cmdline_actions -> cmdline_options
val do_action : Arg.key -> string list -> cmdline_actions -> unit
val action_list : cmdline_actions -> Arg.key list
OCaml

Innovation. Community. Security.