Would it be possible to show the default values in the help menu?
For example:
// CLI options
const Flags = struct {
// Optional description of the program.
pub const description =
\\The GatorCAT CLI.
;
// sub commands
command: union(enum) {
// scan bus
scan: struct {
ifname: []const u8,
recv_timeout_us: u32 = 10000,
eeprom_timeout_us: u32 = 10000,
pub const descriptions = .{
.ifname = "Network interface to use for the bus scan.",
.recv_timeout_us = "Frame receive timeout in microseconds.",
.eeprom_timeout_us = "SII EEPROM timeout in microseconds.",
};
},
},
};
Produces:
gatorcat scan -h
Usage: gatorcat scan --ifname <ifname> [--recv-timeout-us <recv-timeout-us>]
[--eeprom-timeout-us <eeprom-timeout-us>] [-h | --help]
Options:
--ifname Network interface to use for the bus scan.
--recv-timeout-us Frame receive timeout in microseconds.
--eeprom-timeout-us SII EEPROM timeout in microseconds.
-h, --help Show this help and exit
The help text could perhaps say that <eeprom-timeout-us> defaults to 10000 somewhere.
Thanks for making this awesome library!!
Would it be possible to show the default values in the help menu?
For example:
Produces:
The help text could perhaps say that
<eeprom-timeout-us> defaults to 10000
somewhere.