Error in generated man page

I tried out generate-manual on the Roll example provided by swift-argument-parser. The manual page looks nice, but the content is partially incorrect.

For reference, here is help:


release> ./Roll -h
USAGE: roll [--times <n>] [--sides <m>] [--seed <seed>] [--verbose]

OPTIONS:
  --times <n>             Rolls the dice <n> times. (default: 1)
  --sides <m>             Rolls an <m>-sided dice. (default: 6)
        Use this option to override the default value of a six-sided die.
  --seed <seed>           A seed to use for repeatable random generation.
  -v, --verbose           Show all roll results.
  -h, --help              Show help information.

Here is the man-page

Error in SYNOPSIS - there is no subcommand

Error after help in DESCRIPTION - subcommands…

Suggested improvement - the parameter descriptions should indicate the default values.

1 Like

IMO the man page is slightly more correct because roll does actually have help subcommand. that said, these two outputs should align. Could you open a GitHub issue for this?

The help subcommand only appears for commands with subcommands, so the help screen is correct here, not the man page.

$ roll help
Error: Unexpected argument 'help'
Usage: roll [--times <n>] [--sides <m>] [--seed <seed>] [--verbose]
  See 'roll --help' for more information.
2 Likes

I stand corrected!

1 Like