Introduce option groups by hadzhiyski · Pull Request #552 · commandlineparser/commandline

@moh-hassan cli is confusing now

for such options:

internal class Options
{
	[Option('u', "url", SetName = "url", Group = "input", Default = "http://localhost:5002/swagger/current/swagger.json")]
	public string SwaggerUrl { get; set; }

	[Option('j', "json", SetName = "json", Group = "input")]
	public string SwaggerJson { get; set; }

	[Option('f', "file", SetName = "file", Group = "input")]
	public string SwaggerFilePath { get; set; }
}

when running exe without any args we have output:

 At least one option from group 'input' (u, url, j, json, f, file) is required.

  -u, --url       (Group: input) (Default: http://localhost:5002/swagger/current/swagger.json)

  -j, --json      (Group: input)

  -f, --file      (Group: input)

So, default value for url will be set only when exe invoked with exe -j "value" or exe -f "value". Which is not what I expect as user of program when see help message.

Also new Group feature does not prevent setting default value for "mutually exclusive" properties, it that by design?