I'm not sure I understand the goal. Do you mean that one command is the parent of another, and provides some options that the other uses? That can be done with a base class for the commands. You don't end up with the syntax you describe, but I'm not sure that syntax is necessary to achieve what you want.
Can you give a more concrete example of what those sub1 and sub2 commands might look like?
I'm not sure I understand the goal. Do you mean that one command is the parent of another, and provides some options that the other uses? That can be done with a base class for the commands. You don't end up with the syntax you describe, but I'm not sure that syntax is necessary to achieve what you want.
Can you give a more concrete example of what those sub1 and sub2 commands might look like?