module Help:sig
..end
val getoptstring : Kwapp.interface -> string
getoptstring interface
: return a string representing the
options part of the command line.Failure
if applied to a nameless switchinterface
: the interface
val helpstring : Kwapp.interface -> string
helpstring interface
: generate multi-line help message
summarizing command-line options.interface
: the interface
val usage1 : ?sub:string -> Kwapp.interface -> string
usage1 ?sub interface
: generate a one-line usage message string,
without the traditional leading "Usage: "
.
Contains the name of the executable, then an optional subcommand
name, then a summary of the options, then finally a summary of
the argv parameters.
Raises Failure
if applied to a nameless switch
sub
: a subcommand name to insertinterface
: the interface
val usagestring : ?sort:bool ->
?actions:(Kwapp.dispatchmode * 'a) list ->
?versiondata:(string * string) list ->
?sub:string -> Kwapp.interface -> string
usagestring ?actions ?sub ?versiondata interface
: generate a complete multi-line usage
message string.
If actions
is provided, the usage string will also summarize
the subcommands.
If versiondata
is provided, a one-line summary of the version
data will be included.
Raises Failure
if applied to a nameless switch
actions
: actions listversiondata
: the version datasub
: a subcommand name to insertval usage : ?actions:(Kwapp.dispatchmode * 'a) list ->
?sub:string ->
?versiondata:(string * string) list ->
?status:int -> ?chan:Pervasives.out_channel -> Kwapp.interface -> 'b
usage ?actions ?sub ?status ?chan interface
: print a complete multi-line
usage message string on chan
and exit with status
.
If actions
is provided, the usage string will also summarize
the subcommands.
If versiondata
is provided, a one-line summary of the version
data will be included.
Raises Failure
if applied to a nameless switch
actions
: actions listsub
: a subcommand name to insertversiondata
: the version datastatus
: the exit status (default: 1)chan
: the channel on which to print (default: standard error)interface
: the interface
val action : ?actions:(Kwapp.dispatchmode * 'c) list ->
?sub:string -> ?versiondata:(string * string) list -> ('a, 'b) Kwapp.action
action ?actions ?sub ?versiondata interface
: an action suitable for Kwapp.dispatch
that
generates a complete help message on stdout and terminates the
program with exit status 0.
If actions
is provided, the usage string will also summarize
the subcommands.
If versiondata
is provided, a one-line summary of the version
data will be included.
Raises Failure
if applied to a nameless switch
actions
: actions listsub
: a subcommand name to insertversiondata
: the version datainterface
: the interface
val helpaction : ?actions:(Kwapp.dispatchmode * 'a) list ->
?sub:string -> ?versiondata:(string * string) list -> ('b, 'c) Kwapp.action