p-ranav / argparse

Argument Parser for Modern C++
MIT License
2.59k stars 244 forks source link

Feature request: subparser (hidden) aliases #365

Open JohannesBe opened 2 months ago

JohannesBe commented 2 months ago

Currently we can add hidden aliases for arguments: thanks for this, it's a great option that I regularly use!

For programs using subcommands though, it can sometimes be nice to also have shorthands for these subcommands. For instance, docker container ls is the 'official' command (shown when doing docker container -h), but docker container list also works.

Some other examples:

If this is too complicated for adding, or you think it's not within scope/the envisioned future of the library, please feel free to completely ignore me. I just thought it could be a nice addition (at least I have some use cases for it) that you'd maybe want to know about :)

Thanks your considerations!

Br, J