Argument value with dash not accepted when using single-dash key
NelsonRothermel opened this issue · 1 comments
NelsonRothermel commented
If I define the following:
[Option('t', "test")]
public string MyArg { get; set; }
then when running with arguments -t -1234
, Parser.Default.ParseArgumentsStrict
returns false. If I use arguments --test -1234
it returns true. Maybe the parser could be smart enough to treat the next argument as the value?
nemec commented
It should work exactly the way you expect. Sounds like a bug, but we are not developing version 1.x anymore. If you upgrade to the latest beta (2.1.1) and are still seeing issues, please submit them to this new repository as this original fork has closed.
If you are unable to upgrade, I believe you can work around the issue by using -t=-1234
or -t-1234
, but I haven't had a chance to test.