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

any_other() records the wrong argument #69

Open
Qix- opened this issue Mar 26, 2022 · 0 comments
Open

any_other() records the wrong argument #69

Qix- opened this issue Mar 26, 2022 · 0 comments

Comments

@Qix-
Copy link

Qix- commented Mar 26, 2022

auto cli = (
	option("--help").set(show_help)
		% "Show this help message",
	(option("-J", "--threads") & value("num_threads", num_threads))
		% "The number of threads to use (default 0, meaning 'auto')",
	value("db_dir").set(dbdir).required(true).blocking(true)
		% "The database directory location",
	any_other(invalid_params)
);

I'm trying to use any_other to error out on unknown flags. In the above, if I run with ./my_prog --askdfjaksjd some_directory, invalid_params receives some_directory instead of the garbage flag. Is there a way to get the garbage flag in a list somewhere to give better error messages?

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