Module Command.Spec.Arg_type

module Arg_type: sig .. end

type 'a t 
the type of a command line argument
val create : ?complete:(Univ_map.t -> part:string -> string list) ->
?key:'a Univ_map.Multi.Key.t -> (string -> 'a) -> 'a t
an argument type includes information about how to parse values of that type from the command line, and (optionally) how to auto-complete partial arguments of that type via bash's programmable TAB-completion. In addition to the argument prefix, autocompletion also has access to any previously parsed arguments in the form of a heterogeneous map into which previously parsed arguments may register themselves by providing a Univ_map.Key using the ~key argument to create.

If the of_string function raises an exception, command line parsing will be aborted and the exception propagated up to top-level and printed along with command-line help.

val of_map : ?key:'a Univ_map.Multi.Key.t ->
'a String.Map.t -> 'a t
an auto-completing Arg_type over a finite set of values
val of_alist_exn : ?key:'a Univ_map.Multi.Key.t ->
(string * 'a) list -> 'a t
convenience wrapper for of_map. Raises on duplicate keys