Skip to content

Commit cf7afb2

Browse files
committed
fix: show subcommand info in short help if there are any
- only invite the user to check help for subcommands if there are any - invite the user to check out the LongHelp for this command with --help License: MIT Signed-off-by: Oli Evans <[email protected]>
1 parent b0de627 commit cf7afb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/helptext.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ const shortHelpFormat = `USAGE
110110
{{end}}{{if .Subcommands}}
111111
SUBCOMMANDS
112112
{{.Subcommands}}
113-
{{end}}{{if .MoreHelp}}
114113
{{.Indent}}For more information about each command, use:
115114
{{.Indent}}'{{.Path}} <subcmd> --help'
115+
{{end}}{{if .MoreHelp}}
116+
{{.Indent}}for more information about this command, use:
117+
{{.Indent}}'{{.Path}} --help'
116118
{{end}}
117119
`
118120

0 commit comments

Comments
 (0)