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 access unbound arguments? #720

Open
MiloszKrajewski opened this issue Dec 3, 2020 · 1 comment
Open

How to access unbound arguments? #720

MiloszKrajewski opened this issue Dec 3, 2020 · 1 comment

Comments

@MiloszKrajewski
Copy link

MiloszKrajewski commented Dec 3, 2020

I would like to pass completely unbound unparsed arguments. From documentation I assumed combination of [Value] attribute add dash-dash should work, for example:

program verb -a 1 2 3 -b 5 6 7 -- ADDITION ARGUMENT COME HERE

yet it does not seem to be working:

[Verb("verb")]
public class Verb
{
	[Option('a')]
	public IEnumerable<int> A { get; set; };

	[Option('b')]
	public IEnumerable<int> B { get; set; };

	[Value(0)]
	public IEnumerable<string> More { get; set; }
}

I guess the problem is index 0 on Value, but it seems to be required?
How it supposed to work?

Thanks,

PS. I used EnableDashDash
PPS. Is it possible that it is working in general but not for verbs?
PPPS. It seems that More gets consumed by 'b' (dash dash is not a circuit breaker when parsing b)

@rmunn
Copy link
Contributor

rmunn commented Feb 6, 2021

This is fixed by PR #610, which will be in version 2.9.0 once it finally gets released. (Release was delayed by an expired API key, but #733 takes care of the API key; once it's merged, the release should finally be possible.)

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

2 participants