Open
Description
Currently, the token following a known option token is not treated as an argument. This means that if the subsequent token matches a subcommand, it will be treated as a subcommand
var optionA = new Option<string>("-a") { Arity = ArgumentArity.ZeroOrOne };
var optionB = new Option<bool>("-b");
var optionC = new Option<bool>("-c");
var command = new RootCommand
{
optionA,
optionB,
optionC
};
var result = command.Parse("-a -bc"); // -> [ root [ -a ] [ -b <True> ] [ -c <True> ] ]
var optionA = new Option<string>("-a");
var root = new RootCommand
{
new Command("subcommand"),
optionA
};
var result = root.Parse("-a subcommand"); // -> [ root [ -a ] [ subcommand ] ]
Should this behavior be changed so that the subsequent token would be considered an argument to the option, producing the following results, respectively, for the above examples?
[ root [ -a <-bc> ]
[ root [ -a <subcommand> ]