@@ -35,7 +35,7 @@ var AppHelpTemplate = `NAME:
35
35
{{template "helpNameTemplate" .}}
36
36
37
37
USAGE:
38
- {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
38
+ {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}} [arguments...]{{end}} {{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
39
39
40
40
VERSION:
41
41
{{.Version}}{{end}}{{end}}{{if .Description}}
@@ -136,7 +136,7 @@ var SubcommandHelpTemplate = `NAME:
136
136
{{template "helpNameTemplate" .}}
137
137
138
138
USAGE:
139
- {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
139
+ {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}} [arguments...]{{end}} {{end}}{{end}}{{if .Description}}
140
140
141
141
DESCRIPTION:
142
142
{{template "descriptionTemplate" .}}{{end}}{{if .VisibleCommands}}
@@ -253,6 +253,8 @@ type App struct {
253
253
Usage string
254
254
// Text to override the USAGE section of help
255
255
UsageText string
256
+ // Whether this command supports arguments
257
+ Args bool
256
258
// Description of the program argument format.
257
259
ArgsUsage string
258
260
// Version of the program
@@ -523,6 +525,8 @@ type Command struct {
523
525
UsageText string
524
526
// A longer explanation of how the command works
525
527
Description string
528
+ // Whether this command supports arguments
529
+ Args bool
526
530
// A short description of the arguments of this command
527
531
ArgsUsage string
528
532
// The category the command is part of
0 commit comments