The commandline interface that I want is something like this:
my-executable command REQUIRED_ARG
# or
my-executable command subcommand [--foo] [--bar]
So, I don't want REQUIRED_ARG
to be required (and to be parsed) when the subcommand
exists.
Mutually exclusive group is close to what I want, but I cannot add subparsers to it. Another approach was described here but that's not my case: I want REQUIRED_ARG
not to be parsed at all in case of subcommand (and this also seems to be a hack).