@cryptotaxi247 / kubo / commits / b836e72ae

cmd2 align arguments properly

Juan Batiz-Benet committed Nov 12, 2014 at 03:39 UTC b836e72aea9ed4552f9ed427f8b2404f2520a175
1 file changed +5 -1
commands/cli/helptext.go
+5 -1
@@ -241,7 +241,11 @@ func argumentText(cmd *cmds.Command) []string {
241 lines := make([]string, len(cmd.Arguments))
242
243 for i, arg := range cmd.Arguments {
244 - lines[i] = argUsageText(arg) + " - " + arg.Description
244 + lines[i] = argUsageText(arg)
245 + }
246 + lines = align(lines)
247 + for i, arg := range cmd.Arguments {
248 + lines[i] += " - " + arg.Description
249 }
250
251 return lines