Mercurial > hgrepos > Python > apps > py-cutils
changeset 347:3f4840eeb0f4
treesum: optimize help output: do not print "-h/--help" for "patterns" and "help"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 01 Apr 2025 18:56:17 +0200 |
| parents | d47965f97abb |
| children | 539e2facbb28 |
| files | cutils/treesum.py |
| diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cutils/treesum.py Tue Apr 01 18:49:27 2025 +0200 +++ b/cutils/treesum.py Tue Apr 01 18:56:17 2025 +0200 @@ -290,14 +290,16 @@ hparser = subparsers.add_parser( "help", help="Show this help message or a subcommand's help and exit", - description="Show this help message or a subcommand's help and exit.") + description="Show this help message or a subcommand's help and exit.", + add_help=False) hparser.add_argument("help_command", nargs='?', metavar="COMMAND") patparser = subparsers.add_parser( "patterns", help="Show the help for PATTERNs and exit", description=fnmatch.HELP_DESCRIPTION, - formatter_class=argparse.RawDescriptionHelpFormatter) + formatter_class=argparse.RawDescriptionHelpFormatter, + add_help=False) vparser = subparsers.add_parser( "version",
