Help uses Short message if Long is not available

This commit is contained in:
Edgard Castro
2015-03-19 20:29:37 +01:00
committed by bep
parent e784a59910
commit 384c059f4b
+1 -1
View File
@@ -248,7 +248,7 @@ func (c *Command) HelpTemplate() string {
if c.HasParent() {
return c.parent.HelpTemplate()
} else {
return `{{.Long | trim}}
return `{{with or .Long .Short }}{{. | trim}}{{end}}
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}
`
}