Closed bitranox closed 3 years ago
This can be avoided by adding a short_help or a summary at the start of the doc string. Below is a patch that would handle the example:
diff --git a/src/click/utils.py b/src/click/utils.py
index 0bff5c0..89d726d 100644
--- a/src/click/utils.py
+++ b/src/click/utils.py
@@ -54,6 +54,13 @@ def make_default_short_help(help, max_length=45):
result = []
done = False
+ # Use only the first line when string shouldn't be rewrapped.
+ if words[0] == '\b':
+ for line in help.splitlines():
+ if line and line != '\b':
+ words = line.split()
+ break
+
for word in words:
if word[-1:] == ".":
done = True
Hey, I'm a fellow from MLH. I'd like to work on this issue.
if You have commands with a multi-line help, the
\b
is not brushed off the help outputif You use -h it looks correct in the terminal :
but if You parse the text, You will see that the
\b
is not brushed off, where it should be, see thenear command3, command4. instead of brushing off the
\b
, You just added one whitespace.this is my example: