p-ranav / argparse

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

Print main command along with subcommand on help page #341

Open teto519f opened 5 months ago

teto519f commented 5 months ago

Hey everybody While using argparse I stumbled upon an issue in the Usage section of subcommand help pages.

For example when typing git add --help the synopsis section starts like this: git add [ ...]

When using argparse to simulate this (like in the example from your readme) the output would look like this: Usage: add [ ...]

I think argparse should also print a "git" in front of the "add", so I implemented a quick fix for this.