Skip to content

Commit fbe554f

Browse files
authored
Fix plugins help description (#112)
In plugin's help command, Description is printed instead of Usage (if it exists).
1 parent cff076f commit fbe554f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/pluginmain.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Environment Variables:
2525
`
2626

2727
const appHelpTemplate = `NAME:
28-
{{.Name}} - {{.Usage}}
28+
{{.Name}} - {{.Description}}
2929
3030
USAGE:
3131
{{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} [arguments...]{{end}}
@@ -37,7 +37,7 @@ AUTHOR(S):
3737
{{range .Authors}}{{ . }}{{end}}
3838
{{end}}{{if .VisibleCommands}}
3939
COMMANDS:
40-
{{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
40+
{{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{if .Description}}{{.Description}}{{else}}{{.Usage}}{{end}}
4141
{{end}}{{end}}{{if .VisibleFlags}}
4242
GLOBAL OPTIONS:
4343
{{range .VisibleFlags}}{{.}}

0 commit comments

Comments
 (0)