Skip to content

Commit 6a6a6f8

Browse files
Stebalienhannahhoward
authored andcommitted
helptext: lower minimum width to 30, raise width to 100
Otherwise, `ipfs daemon --help` and `ipfs p2p --help` look terrible.
1 parent abd8def commit 6a6a6f8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cli/helptext.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
const (
15-
terminalWidth = 80
15+
terminalWidth = 100
1616
requiredArg = "<%v>"
1717
optionalArg = "[<%v>]"
1818
variadicArg = "%v..."
@@ -325,9 +325,8 @@ func appendWrapped(prefix, text string, width int) string {
325325
bWidth := width - offset
326326

327327
text = strings.Trim(text, whitespace)
328-
// Let the terminal handle wrapping if it's to small. Otherwise
329-
// we get really small lines.
330-
if bWidth < 40 {
328+
// Minimum help-text width is 30 characters.
329+
if bWidth < 30 {
331330
prefix += text
332331
return prefix
333332
}

0 commit comments

Comments
 (0)