Skip to content
Myr

Print Long description when printing Help, fixes #20

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sam Ghods · committed by spf13 · parent 8d72c1e · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:command.go+3 added-3 removed
137 unmodified lines
138 } else {139 return func(c *Command, args []string) {140 if len(args) == 0 {141 // Help called without any topic, calling on root142 c.Root().Usage()142 c.Root().Help()143 return144 }145146 cmd, _, e := c.Root().Find(args)
65 unmodified lines
212 if c.HasParent() {213 return c.parent.HelpTemplate()214 } else {215 return `{{.Long | trim}}216{{if .Runnable}}{{.UsageString}}{{end}}216{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}217`218 }219}220
180 unmodified lines
401 // Only the executable is called and the root is runnable, run it402 if c.Runnable() {403 err = c.execute([]string(nil))404 } else {405 c.Usage()405 c.Help()406 }407 } else {408 err = c.findAndExecute(args)409 }
328 unmodified lines