Open ekkis opened 11 years ago
I forget CommandLine's behavior, but what happens if you put the -s
before the positional argument? (also, you have defined another option to consume ./file-to-munch.txt
, right?)
but I would imagine that
c:> test -s ./file-to-munch.txt
would cause the -s parameter to gobble the filename as an argument, which is not what's intended... which brings up the question, in unix one can use -- to end the options field, so that would allow me to write:
c:> test -s -- ./file-to-munch.txt
and that would mean: 1) specify a -s with the default value, and 2) pass an unbound parameter with value ./file-to-munch.txt
is there support for that syntax here?
I've defined an option like this:
[Option('s', HelpText = "Save name", DefaultValue="Main")] public string SaveName { get; set; }
but when I run my programme as:
c:> test ./file-to-munch.txt -s
I get a failure of ParseArgumentsStrict. what have I done wrong?