p-ranav/argparse

Customize argument priority check

nmoreaud opened this issue · 0 comments

For example with this program:

program.add_description("Compute");
program.add_argument("input").help("input file");
program.add_argument("-o").required();
program.add_argument("-r").required();
program.parse_args(m_argc, m_argv);

I obtain:

-o: required.

Could we be able to choose the priority of parameter check?
I'd like "input" argument to trigger an error first, ex:

1 argument(s) expected. 0 provided.