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

How to repeat repeatable values. #48

Open
stevemk14ebr opened this issue Apr 5, 2020 · 0 comments
Open

How to repeat repeatable values. #48

stevemk14ebr opened this issue Apr 5, 2020 · 0 comments

Comments

@stevemk14ebr
Copy link

stevemk14ebr commented Apr 5, 2020

How do i correctly write:

std::string cmdFnTypeDef;
std::vector<std::string> cmdFnArgs;
auto cli = (
	clipp::repeatable(clipp::option("-f", "--func") & clipp::value("typedef", cmdFnTypeDef) & clipp::values("args", cmdFnArgs))
);

i want it to look like:
-f blah(a1,a2,a3,a4) 0 1 2 3
-f blah2(a1,a2) 0 1
-f blah2(a0) 4

but as is the first -f is only matched and all the rest of the args end up in the vector. I could duplicate the group but then i'd have hard cap on the count of -f's i support.

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