forked from mirror/cobra
Help uses Short message if Long is not available
This commit is contained in:
parent
e784a59910
commit
384c059f4b
|
@ -248,7 +248,7 @@ func (c *Command) HelpTemplate() string {
|
||||||
if c.HasParent() {
|
if c.HasParent() {
|
||||||
return c.parent.HelpTemplate()
|
return c.parent.HelpTemplate()
|
||||||
} else {
|
} else {
|
||||||
return `{{.Long | trim}}
|
return `{{with or .Long .Short }}{{. | trim}}{{end}}
|
||||||
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}
|
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue