module Flag:sig
..end
type 'a
t
val required : 'a Command.Arg_type.t -> 'a t
val optional : 'a Command.Arg_type.t -> 'a option t
val optional_with_default : 'a -> 'a Command.Arg_type.t -> 'a t
optional_with_default
flags may be passed at most once, and
default to a given valueval listed : 'a Command.Arg_type.t -> 'a list t
listed
flags may be passed zero or more timesval one_or_more : 'a Command.Arg_type.t -> ('a * 'a list) t
one_or_more
flags must be passed one or more timesval no_arg : bool t
no_arg
flags may be passed at most once. The boolean returned
is true iff the flag is passed on the command lineval no_arg_register : key:'a Core_kernel.Std.Univ_map.With_default.Key.t ->
value:'a -> bool t
no_arg_register ~key ~value
is like no_arg
, but associates value
with key
in the in the auto-completion environmentval no_arg_abort : exit:(unit -> Core_kernel.Std.never_returns) -> unit t
no_arg_abort ~exit
is like no_arg
, but aborts command-line parsing
by calling exit
. This flag type is useful for "help"-style flags that
just print something and exit.val escape : string list option t
escape
flags may be passed at most once. They cause the command line parser to
abort and pass through all remaining command line arguments as the value of the
flag.
A standard choice of flag name to use with escape
is "--"
.