make defaults in command help look like standard argparse

This commit is contained in:
Todd Gamblin 2018-02-11 00:15:35 -05:00
parent 8f52de32b6
commit 39e6d54956
5 changed files with 7 additions and 7 deletions

View File

@ -35,7 +35,7 @@
def setup_parser(subparser):
subparser.add_argument(
'-j', '--jobs', action='store', type=int,
help="explicitly set number of make jobs. default is #cpus")
help="explicitly set number of make jobs (default: #cpus)")
subparser.add_argument(
'--keep-prefix', action='store_true', dest='keep_prefix',
help="don't remove the install prefix if installation fails")

View File

@ -226,7 +226,7 @@ def setup_parser(subparser):
help="send filtered files to stdout as well as temp files")
subparser.add_argument(
'-r', '--root-relative', action='store_true', default=False,
help="print root-relative paths (default is cwd-relative)")
help="print root-relative paths (default: cwd-relative)")
subparser.add_argument(
'-U', '--no-untracked', dest='untracked', action='store_false',
default=True, help="exclude untracked files from checks")

View File

@ -56,7 +56,7 @@ def setup_parser(subparser):
)
subparser.add_argument(
'-j', '--jobs', action='store', type=int,
help="explicitly set number of make jobs. default is #cpus")
help="explicitly set number of make jobs (default: #cpus)")
subparser.add_argument(
'--overwrite', action='store_true',
help="reinstall an existing spec, even if it has dependents")

View File

@ -49,8 +49,8 @@ def setup_parser(subparser):
help="wrap width: auto-size to terminal by default; 0 for no wrap")
subparser.add_argument(
'-j', '--jobs', action='store', type=int, default=None,
help="number of jobs to parse log file; default is 1 for short logs, "
"ncpus for long logs")
help="number of jobs to parse log file (default: 1 for short logs, "
"ncpus for long logs)")
subparser.add_argument(
'file', help="a log file containing build output, or - for stdin")

View File

@ -278,7 +278,7 @@ def make_argument_parser():
help="show this help message and exit")
parser.add_argument('--color', action='store', default='auto',
choices=('always', 'never', 'auto'),
help="when to colorize output; default is auto")
help="when to colorize output (default: auto)")
parser.add_argument('-d', '--debug', action='store_true',
help="write out debug logs during compile")
parser.add_argument('-D', '--pdb', action='store_true',
@ -294,7 +294,7 @@ def make_argument_parser():
help="profile and sort by one or more of:\n[%s]" %
',\n '.join([', '.join(line) for line in stat_lines]))
parser.add_argument('--lines', default=20, action='store',
help="lines of profile output; default 20; or 'all'")
help="lines of profile output or 'all' (default: 20)")
parser.add_argument('-v', '--verbose', action='store_true',
help="print additional output during builds")
parser.add_argument('-s', '--stacktrace', action='store_true',