Open ruanwenjun opened 10 months ago
Have you read the docs? Have you tried it out?
Have you read the docs? Have you tried it out?
I have read the doc, find I can add sub command by following way
In this way, I need to create subcommand object first and check each after parsed, I am not sure if there exist other better way.
Can you please rewrite your test in a way that demonstrates what you like to do instead of the above code, and can you please outline why your intended solution would be easier/better/superior? That makes it easier for us to understand if/why/how to change JCommander's API. :-)
BTW, there is no need to paste JPGs. In fact, it makes it harder for us to copy-paste your demo code. If you could use backticks to markup plain text we would be able to try out your code without the need to transcripe it from the JPG. Thanks.
@ruanwenjun Still looking forward to receive your answer in the current discussion! :-)
In my usage, I hope to parse the input args into some sub command. e.g. The input looks like
And I have Three sub command ICommand, OCommand, PCommand, I hope JCommand receive args, and can return ICommand, OCommand, PCommand or return only one command which order is higher.