:- use_module(library(main)).(can be autoloaded)
debug. Other meaningful options are
warning. The help page consists of four sections, two of which are optional:
- The header is created from
opt_help(help(header), String). It is optional.
- The usage is added by default. The part behind
Usage: <command>is by default
[options]and can be overruled using
- The actual option descriptions. The options are presented in the order they are defined in opt_type/3. Subsequent options for the same destination (option name) are joined with the first.
- The footer_ is created from
opt_help(help(footer), String). It is optional.
The help provided by
help(footer) are either a simple string or a list of
elements as defined by
In the latter case, the construct
\Callable can be used to
call a DCG rule in the module from which the user calls argv_options/3.
For example, we can add a bold title using
opt_help(help(header), [ansi(bold, '~w', ['My title'])]).