improve help by including parent command for subcommands

This commit is contained in:
Tristan Zajonc
2015-08-04 21:13:28 -07:00
parent ef65245544
commit ecb0b5ac0a
2 changed files with 6 additions and 2 deletions

View File

@@ -38,10 +38,10 @@ COPYRIGHT:
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var CommandHelpTemplate = `NAME:
{{.FullName}} - {{.Usage}}
{{.ParentName}} {{.Name}} - {{.Usage}}
USAGE:
command {{.FullName}}{{if .Flags}} [command options]{{end}} {{.ArgsUsage}}{{if .Description}}
{{.ParentName}} {{.Name}}{{if .Flags}} [command options]{{end}} {{.ArgsUsage}}{{if .Description}}
DESCRIPTION:
{{.Description}}{{end}}{{if .Flags}}