mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-02 14:51:58 +00:00
kubectl should print usage at the bottom
Override the Usage: output using SetUsageTemplate. Just moved the strings in the template to make sure we print Usage: at the bottom of the output and not at the top. Fixes issue 7496
This commit is contained in:
4
vendor/github.com/spf13/cobra/command.go
generated
vendored
4
vendor/github.com/spf13/cobra/command.go
generated
vendored
@@ -295,9 +295,7 @@ func (c *Command) HelpTemplate() string {
|
||||
if c.HasParent() {
|
||||
return c.parent.HelpTemplate()
|
||||
}
|
||||
return `{{with or .Long .Short }}{{. | trim}}
|
||||
|
||||
{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
|
||||
return `{{with or .Long .Short }}{{. | trim}}{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
|
||||
}
|
||||
|
||||
// Really only used when casting a command to a commander
|
||||
|
||||
Reference in New Issue
Block a user