mirror of https://github.com/docker/cli.git
Replace tab with spaces in usage output
All output of the usage / --help output uses spaces, and having a tab in the output can be somewhat cumbersome (e.g. our YAML docs generator doesn't like them, and copy/pasing the output in iTerm produces a warning). This patch changes the output to use two spaces instead. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
9b92be00e4
commit
7f3717bd2a
|
@ -282,8 +282,8 @@ func invalidPluginReason(cmd *cobra.Command) string {
|
||||||
|
|
||||||
var usageTemplate = `Usage:
|
var usageTemplate = `Usage:
|
||||||
|
|
||||||
{{- if not .HasSubCommands}} {{.UseLine}}{{end}}
|
{{- if not .HasSubCommands}} {{.UseLine}}{{end}}
|
||||||
{{- if .HasSubCommands}} {{ .CommandPath}}{{- if .HasAvailableFlags}} [OPTIONS]{{end}} COMMAND{{end}}
|
{{- if .HasSubCommands}} {{ .CommandPath}}{{- if .HasAvailableFlags}} [OPTIONS]{{end}} COMMAND{{end}}
|
||||||
|
|
||||||
{{if ne .Long ""}}{{ .Long | trim }}{{ else }}{{ .Short | trim }}{{end}}
|
{{if ne .Long ""}}{{ .Long | trim }}{{ else }}{{ .Short | trim }}{{end}}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ func TestNonexistingHelp(t *testing.T) {
|
||||||
// This should actually be the whole docker help
|
// This should actually be the whole docker help
|
||||||
// output, so spot check instead having of a golden
|
// output, so spot check instead having of a golden
|
||||||
// with everything in, which will change too frequently.
|
// with everything in, which will change too frequently.
|
||||||
Out: "Usage: docker [OPTIONS] COMMAND\n\nA self-sufficient runtime for containers",
|
Out: "Usage: docker [OPTIONS] COMMAND\n\nA self-sufficient runtime for containers",
|
||||||
Err: icmd.None,
|
Err: icmd.None,
|
||||||
})
|
})
|
||||||
// Short -h should be the same, modulo the deprecation message
|
// Short -h should be the same, modulo the deprecation message
|
||||||
|
@ -101,7 +101,7 @@ func TestBadHelp(t *testing.T) {
|
||||||
// This should be literally the whole docker help
|
// This should be literally the whole docker help
|
||||||
// output, so spot check instead of a golden with
|
// output, so spot check instead of a golden with
|
||||||
// everything in which will change all the time.
|
// everything in which will change all the time.
|
||||||
Out: "Usage: docker [OPTIONS] COMMAND\n\nA self-sufficient runtime for containers",
|
Out: "Usage: docker [OPTIONS] COMMAND\n\nA self-sufficient runtime for containers",
|
||||||
Err: icmd.None,
|
Err: icmd.None,
|
||||||
})
|
})
|
||||||
// Short -h should be the same, modulo the deprecation message
|
// Short -h should be the same, modulo the deprecation message
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
Usage: docker helloworld goodbye
|
Usage: docker helloworld goodbye
|
||||||
|
|
||||||
Say Goodbye instead of Hello
|
Say Goodbye instead of Hello
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Usage: docker helloworld [OPTIONS] COMMAND
|
Usage: docker helloworld [OPTIONS] COMMAND
|
||||||
|
|
||||||
A basic Hello World plugin for tests
|
A basic Hello World plugin for tests
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Usage: docker stack deploy [OPTIONS] STACK
|
Usage: docker stack deploy [OPTIONS] STACK
|
||||||
|
|
||||||
Deploy a new stack or update an existing stack
|
Deploy a new stack or update an existing stack
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Usage: docker stack deploy [OPTIONS] STACK
|
Usage: docker stack deploy [OPTIONS] STACK
|
||||||
|
|
||||||
Deploy a new stack or update an existing stack
|
Deploy a new stack or update an existing stack
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue