argparse icon indicating copy to clipboard operation
argparse copied to clipboard

Incorrect help message for argparse::nargs_pattern::at_least_one

Open ruanformigoni opened this issue 2 years ago • 2 comments

Greetings,

I've noticed that when using something like:

      m_parser.add_argument("args")
        .nargs(argparse::nargs_pattern::at_least_one)
        .remaining()
        .required()
        .help("Install an application into the default directory");

It generates the help message:

Usage: args [--help] [--version] args

Positional arguments:
  args           Install an application into the default directory [nargs: 0 or more] [required]

Optional arguments:
  -h, --help     shows help message and exits 
  -v, --version  prints version information and exits 

Shouldn't it say nargs: 1 or more instead of 0?

Thanks!

ruanformigoni avatar Jan 23 '24 00:01 ruanformigoni

亲,来信已经收到!祝你快乐!

wanjiadenghuo111 avatar Jan 23 '24 00:01 wanjiadenghuo111