defaultByName

If a groupChoice or groupSwitch option is not called on the command line, use the value of the group with a switch or choice name.

Example:

option().groupChoice("foo" to FooOptionGroup(), "bar" to BarOptionGroup()).defaultByName("foo")
option().groupSwitch("--foo" to FooOptionGroup(), "--bar" to BarOptionGroup()).defaultByName("--bar")

Throws

if name is not one of the option's choice/switch names.