Skip to content

Commit

Permalink
Fix help command columnular layout for longer commands
Browse files Browse the repository at this point in the history
  • Loading branch information
zph committed Sep 21, 2019
1 parent f1e2725 commit 05bc1e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions help/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func OutputAllShort(r io.Reader, w io.Writer, targets []string) error {
return err
}

width := targetWidth(comments)
width := targetWidth(comments) + 15
fmt.Fprintf(w, "\n")
for _, c := range comments {
if c.Target == "" {
Expand Down Expand Up @@ -136,5 +136,5 @@ func printShort(w io.Writer, c parser.Comment, width int) (int, error) {
comment = comment + " (default)"
}

return fmt.Fprintf(w, " %-*s %-s\n", width+2, color.HiBlueString(c.Target), color.GreenString(comment))
return fmt.Fprintf(w, " %-*s %-s\n", width+2, color.HiBlueString(c.Target), indent(indent(color.GreenString(comment))))
}

0 comments on commit 05bc1e9

Please sign in to comment.