Skip to content

Commit 79620b6

Browse files
committed
helptext: lower minimum width to 30, raise width to 100
Otherwise, `ipfs daemon --help` and `ipfs p2p --help` look terrible.
1 parent f4e8230 commit 79620b6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cli/helptext.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
const (
16-
terminalWidth = 80
16+
terminalWidth = 100
1717
requiredArg = "<%v>"
1818
optionalArg = "[<%v>]"
1919
variadicArg = "%v..."
@@ -326,9 +326,8 @@ func appendWrapped(prefix, text string, width int) string {
326326
bWidth := width - offset
327327

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

0 commit comments

Comments
 (0)