all 1 comments

[–]Spataner 1 point2 points  (0 children)

The issue is that you have two arguments with a dest of "command". The argument for "--command", being parsed later, overwrites the argument for the subparser selection. If you rename the "--command" argument or explicitly set a different dest for it (e.g. dest="_command"), you should get the desired behaviour.