From 1afea60c6fd8d3467bbf1496dc20bfe6083b5c5e Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 23 Apr 2016 22:00:34 +0100 Subject: [PATCH] [UI] Indent subsequent lines in argparse help --- deluge/ui/baseargparser.py | 2 +- deluge/ui/ui_entry.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/baseargparser.py b/deluge/ui/baseargparser.py index 4a86e25ca..d5f9b00d5 100644 --- a/deluge/ui/baseargparser.py +++ b/deluge/ui/baseargparser.py @@ -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): diff --git a/deluge/ui/ui_entry.py b/deluge/ui/ui_entry.py index b9716e5d8..1630c5ae9 100644 --- a/deluge/ui/ui_entry.py +++ b/deluge/ui/ui_entry.py @@ -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(),