Wrap command long description
diff --git a/help.go b/help.go
index e207219..4ab86b0 100644
--- a/help.go
+++ b/help.go
@@ -171,6 +171,7 @@
}
wr := bufio.NewWriter(writer)
+ aligninfo := p.getAlignmentInfo()
if p.ApplicationName != "" {
wr.WriteString("Usage:\n")
@@ -190,12 +191,15 @@
if p.currentCommand != nil && len(p.currentCommand.LongDescription) != 0 {
fmt.Fprintln(wr)
- fmt.Fprintln(wr, p.currentCommand.LongDescription)
+
+ t := wrapText(p.currentCommand.LongDescription,
+ aligninfo.terminalColumns,
+ "")
+
+ fmt.Fprintln(wr, t)
}
}
- aligninfo := p.getAlignmentInfo()
-
seen := make(map[*Group]bool)
writeHelp := func(index int, grp *Group) {