Merge pull request #806 from mingrammer/fix-help-indentation
Fix the unaligned indents for the command help messages
This commit is contained in:
commit
07c1638969
@ -874,7 +874,7 @@ Will include:
|
|||||||
|
|
||||||
```
|
```
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
noop
|
noop
|
||||||
|
|
||||||
Template actions:
|
Template actions:
|
||||||
add
|
add
|
||||||
|
@ -136,8 +136,8 @@ func ExampleApp_Run_appHelp() {
|
|||||||
// Oliver Allen <oliver@toyshop.com>
|
// Oliver Allen <oliver@toyshop.com>
|
||||||
//
|
//
|
||||||
// COMMANDS:
|
// COMMANDS:
|
||||||
// describeit, d use it to see a description
|
// describeit, d use it to see a description
|
||||||
// help, h Shows a list of commands or help for one command
|
// help, h Shows a list of commands or help for one command
|
||||||
//
|
//
|
||||||
// GLOBAL OPTIONS:
|
// GLOBAL OPTIONS:
|
||||||
// --name value a name to say (default: "bob")
|
// --name value a name to say (default: "bob")
|
||||||
@ -190,7 +190,7 @@ func ExampleApp_Run_noAction() {
|
|||||||
// [global options] command [command options] [arguments...]
|
// [global options] command [command options] [arguments...]
|
||||||
//
|
//
|
||||||
// COMMANDS:
|
// COMMANDS:
|
||||||
// help, h Shows a list of commands or help for one command
|
// help, h Shows a list of commands or help for one command
|
||||||
//
|
//
|
||||||
// GLOBAL OPTIONS:
|
// GLOBAL OPTIONS:
|
||||||
// --help, -h show help
|
// --help, -h show help
|
||||||
|
13
help.go
13
help.go
@ -30,8 +30,9 @@ AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
|
|||||||
|
|
||||||
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
||||||
|
|
||||||
{{.Name}}:{{end}}{{range .VisibleCommands}}
|
{{.Name}}:{{range .VisibleCommands}}
|
||||||
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
|
||||||
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
|
||||||
|
|
||||||
GLOBAL OPTIONS:
|
GLOBAL OPTIONS:
|
||||||
{{range $index, $option := .VisibleFlags}}{{if $index}}
|
{{range $index, $option := .VisibleFlags}}{{if $index}}
|
||||||
@ -71,9 +72,11 @@ USAGE:
|
|||||||
{{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}
|
{{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}
|
||||||
|
|
||||||
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
||||||
{{.Name}}:{{end}}{{range .VisibleCommands}}
|
|
||||||
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}
|
{{.Name}}:{{range .VisibleCommands}}
|
||||||
{{end}}{{if .VisibleFlags}}
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
|
||||||
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
{{range .VisibleFlags}}{{.}}
|
{{range .VisibleFlags}}{{.}}
|
||||||
{{end}}{{end}}
|
{{end}}{{end}}
|
||||||
|
Loading…
Reference in New Issue
Block a user