[UI] Indent subsequent lines in argparse help

This commit is contained in:
Calum Lind 2016-04-23 22:00:34 +01:00
parent a49b459a59
commit 1afea60c6f
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class DelugeTextHelpFormatter(argparse.RawDescriptionHelpFormatter):
"""
wrapped_lines = []
for l in text.splitlines():
wrapped_lines.extend(textwrap.wrap(l, width))
wrapped_lines.extend(textwrap.wrap(l, width, subsequent_indent=" "))
return wrapped_lines
def _format_action_invocation(self, action):

View File

@ -47,7 +47,7 @@ def start_ui():
cmd_help.extend(["%s -- %s" % (k, getattr(v, "cmdline", "")) for k, v in ui_entrypoints.iteritems()])
group.add_argument("-u", "--ui", action="store",
choices=ui_entrypoints.keys(), help="\n* ".join(cmd_help))
choices=ui_entrypoints.keys(), help="\n * ".join(cmd_help))
group.add_argument("-a", "--args", action="store",
help=_('Arguments to pass to the UI. Multiple args must be quoted, e.g. -a "--option args"'))
group.add_argument("-s", "--set-default-ui", dest="default_ui", choices=ui_entrypoints.keys(),