The description for the command which is set as default is not shown when doing --help.
It is only shown when doing <command name> --help.
Snippet:
import
confutils
type
ExporterCmd* = enum
exportCommand =
"Some very important description, must read this!"
printCommand =
"Some description"
ExporterConf* = object
case cmd* {.
command
defaultValue: exportCommand .}: ExporterCmd
of exportCommand:
port* {.
defaultValue: 1
desc: "some port"
name: "port" .}: uint16
of printCommand:
portP* {.
defaultValue: 1
desc: "some port"
name: "port" .}: uint16
when isMainModule:
let config = ExporterConf.load()
No important description to be seen:
$ ./test_conf --help
Usage:
test_conf command
--port some port [=1].
Available sub-commands:
test_conf printCommand [OPTIONS]...
Some description.
The following options are available:
--port some port [=1].
Only seen when specifically using the command:
$ ./test_conf exportCommand --help
Usage:
test_conf exportCommand [OPTIONS]...
Some very important description, must read this!.
The following options are available:
--port some port [=1].
And when removing the default:
./test_conf --help
Usage:
test_conf command
Available sub-commands:
test_conf exportCommand [OPTIONS]...
Some very important description, must read this!.
The following options are available:
--port some port [=1].
test_conf printCommand [OPTIONS]...
Some description.
The following options are available:
--port some port [=1].
The description for the command which is set as default is not shown when doing
--help
. It is only shown when doing<command name> --help
.Snippet:
No important description to be seen:
Only seen when specifically using the command:
And when removing the default: