From 375d9a409ba04a3eaaa57af4a1e5652f9a104bfe Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 31 May 2018 08:09:51 -0700 Subject: [PATCH] Show long help message when defined This fixes the help template so that if a command includes a Long form help message that is displayed instead of ignoring it and always showing the Short message. Signed-off-by: Daniel Hiltgen --- cli/cobra.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cobra.go b/cli/cobra.go index 1b5809e9e5..7227dd3a23 100644 --- a/cli/cobra.go +++ b/cli/cobra.go @@ -104,7 +104,7 @@ var usageTemplate = `Usage: {{- if not .HasSubCommands}} {{.UseLine}}{{end}} {{- if .HasSubCommands}} {{ .CommandPath}} COMMAND{{end}} -{{ .Short | trim }} +{{if ne .Long ""}}{{ .Long | trim }}{{ else }}{{ .Short | trim }}{{end}} {{- if gt .Aliases 0}}