NOTE: Option defined as a property is treated as required by default. If you want a non-required Option to have a default value, mark it with HasDefaultValue attribute.
if would be great to have:
public record MyCommandOptions : ICommandParameterSet
{
[Option('T', Description = "a default 3 state option")]
[HasDefaultValue]
public string ThreeStateWithDefault { get; set; } = "";
...
}
such that once can just specify -T or --three-state-with-default with out a following value, and the default value would be used. The option then acts as a switch (like a bool) and can have a user value supplied is needed that overrides the default.
per https://github.com/mayuki/Cocona/pull/31#issue-960283993 - I seem be missing something but the note says
if would be great to have:
such that once can just specify
-T
or--three-state-with-default
with out a following value, and the default value would be used. The option then acts as a switch (like a bool) and can have a user value supplied is needed that overrides the default.Currently we need to also supply a value.