Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 145:073e0faea599
Optimize help output for subcommands
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 03 Jan 2025 16:22:59 +0100 |
| parents | b39f8082ced1 |
| children | 7d8df8311e3b |
comparison
equal
deleted
inserted
replaced
| 144:b39f8082ced1 | 145:073e0faea599 |
|---|---|
| 97 "-v", "--version", action="version", | 97 "-v", "--version", action="version", |
| 98 version="%s (rv:%s)" % (__version__, __revision__)) | 98 version="%s (rv:%s)" % (__version__, __revision__)) |
| 99 | 99 |
| 100 subparsers = parser.add_subparsers( | 100 subparsers = parser.add_subparsers( |
| 101 dest="subcommand", | 101 dest="subcommand", |
| 102 title="Commands", | |
| 102 description="This tool uses subcommands. " | 103 description="This tool uses subcommands. " |
| 103 "To see detailed help for a specific subcommand use " | 104 "To see detailed help for a specific subcommand use " |
| 104 "the -h/--help option after the subcommand name. " | 105 "the -h/--help option after the subcommand name. " |
| 105 "A short list of valid commands are listed below:") | 106 "A short list of valid commands are listed below:", |
| 107 metavar="COMMAND") | |
| 106 | 108 |
| 107 genparser = subparsers.add_parser( | 109 genparser = subparsers.add_parser( |
| 108 "generate", | 110 "generate", |
| 109 help="Generate checksums for directory trees.", | 111 help="Generate checksums for directory trees.", |
| 110 description="Generate checksums for directory trees") | 112 description="Generate checksums for directory trees") |
