Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize argument priority check #284

Open
nmoreaud opened this issue Aug 24, 2023 · 0 comments
Open

Customize argument priority check #284

nmoreaud opened this issue Aug 24, 2023 · 0 comments

Comments

@nmoreaud
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant