Permalink
Browse files

terminal columns are not always available, assume 80

  • Loading branch information...
1 parent 08790ce commit 82950e31aa826988fa64cfbde9cf5cdceadf7050 @fabiokung committed Oct 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 help.go
View
@@ -109,6 +109,9 @@ func (p *Parser) WriteHelp(writer io.Writer) {
maxlen := maxlonglen + 4
termcol := getTerminalColumns()
+ if termcol <= 0 {
+ termcol = 80
+ }
for _, grp := range p.Groups {
wr.WriteString("\n")

0 comments on commit 82950e3

Please sign in to comment.