有没有办法使用 CommonsCLI 创建一对组,当且仅当使用来自另一个组的项目时才能使用其中一个组?(即两者或都不是)
例如,给定选项选择...
-foo Enable foo. Must enable either bar or baz, cannot (for obvious reasons) be combined with moo.
-moo Enable moo. Must enable either bar or baz, cannot (for obvious reasons) be combined with foo.
-bar Set foo or moo mode to foobar or moobar. Cannot be used without foo or moo modes. Cannot be combined with baz.
-baz Set foo or moo mode to foobaz or moobaz. Cannot be used without foo or moo modes. Cannot be combined with bar.
这给出了......的有效模式
-foo -bar
-foo -baz
-moo -bar
-moo -baz
<None>
和...的无效模式
-foo -moo [-bar / -baz / None]
-bar -baz [-foo / -moo / None]
-bar
-baz
-foo
-moo