p-ranav / argparse

Argument Parser for Modern C++
MIT License
2.59k stars 244 forks source link

Incorrect help message for argparse::nargs_pattern::at_least_one #322

Closed ruanformigoni closed 1 week ago

ruanformigoni commented 7 months ago

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!

wanjiadenghuo111 commented 7 months ago

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

Eng-MohamedHussien commented 1 week ago

Hi @ruanformigoni,