package cmdliner
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=a7bd4eeb0cef7c08bca73b0077a65f748c19a230544133b39fc3360feb2cf0af08416a8b84031c94a2f4a007d5920a4db1368d87b9eeca561671828e2dad2885
doc/cmdliner/Cmdliner/Cmd/Exit/index.html
Module Cmd.ExitSource
Exit codes and their information.
Exit codes
The type for exit codes.
Warning. You should avoid status codes strictly greater than 125 as those may be used by some shells.
Predefined codes
These are documented by defaults.
val ok : codeok is 0, the exit status for success.
val some_error : codesome_error is 123, an exit status for indiscriminate errors reported on stderr.
val cli_error : codecli_error is 124, an exit status for command line parsing errors.
val internal_error : codeinternal_error is 125, an exit status for unexpected internal errors.
Exit code information
val info :
?docs:Manpage.section_name ->
?doc:string ->
?max:code ->
code ->
infoinfo ~docs ~doc min ~max describe the range of exit statuses from min to max (defaults to min).
docis the man page information for the statuses, defaults to"undocumented". The documentation markup language can be used with following variables:$(status), the value ofmin.$(status_max), the value ofmax.- The variables mentioned in the documentation of
Cmd.info
docsis the title of the man page section in which the statuses will be listed, it defaults toManpage.s_exit_status.
val defaults : info listdefaults are exit code information for ok, some_error, cli_error and internal_error.