From 07f49ff523ff9f691cd631515a783646614207cb Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 27 Feb 2017 15:01:23 -0800 Subject: [PATCH] cli: Fix more commands with inconsistent UI --- cmd/config-host-main.go | 10 +++++----- cmd/events-add.go | 4 ++-- cmd/events-list.go | 4 ++-- cmd/events-remove.go | 2 +- cmd/mb-main.go | 1 - cmd/policy-main.go | 1 - cmd/session-main.go | 1 - cmd/version-main.go | 4 ++-- cmd/watch-main.go | 1 - 9 files changed, 12 insertions(+), 16 deletions(-) diff --git a/cmd/config-host-main.go b/cmd/config-host-main.go index 48475584cf..b51380d4c0 100644 --- a/cmd/config-host-main.go +++ b/cmd/config-host-main.go @@ -39,15 +39,15 @@ var configHostCmd = cli.Command{ Action: mainConfigHost, Before: setGlobalsFromContext, CustomHelpTemplate: `NAME: - {{.HelpName}} - {{.Usage}} + {{.HelpName}} - {{.Usage}} USAGE: - {{.HelpName}} OPERATION + {{.HelpName}} OPERATION OPERATION: - add ALIAS URL ACCESS-KEY SECRET-KEY [API] - remove ALIAS - list + add ALIAS URL ACCESS-KEY SECRET-KEY [API] + remove ALIAS + list FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/events-add.go b/cmd/events-add.go index 34117806b3..764258ea60 100644 --- a/cmd/events-add.go +++ b/cmd/events-add.go @@ -51,10 +51,10 @@ var eventsAddCmd = cli.Command{ Before: setGlobalsFromContext, Flags: append(eventsAddFlags, globalFlags...), CustomHelpTemplate: `NAME: - {{.HelpName}} - {{.Usage}} + {{.HelpName}} - {{.Usage}} USAGE: - {{.HelpName}} ALIAS/BUCKET ARN [FLAGS] + {{.HelpName}} ALIAS/BUCKET ARN [FLAGS] FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/events-list.go b/cmd/events-list.go index 2221f2a66a..f7d3a56a0c 100644 --- a/cmd/events-list.go +++ b/cmd/events-list.go @@ -37,10 +37,10 @@ var eventsListCmd = cli.Command{ Before: setGlobalsFromContext, Flags: append(eventsListFlags, globalFlags...), CustomHelpTemplate: `NAME: - {{.HelpName}} - {{.Usage}} + {{.HelpName}} - {{.Usage}} USAGE: - {{.HelpName}} ALIAS/BUCKET ARN [FLAGS] + {{.HelpName}} ALIAS/BUCKET ARN [FLAGS] FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/events-remove.go b/cmd/events-remove.go index abe296acb2..caa80e0347 100644 --- a/cmd/events-remove.go +++ b/cmd/events-remove.go @@ -45,7 +45,7 @@ var eventsRemoveCmd = cli.Command{ {{.HelpName}} - {{.Usage}} USAGE: - {{.HelpName}} ALIAS/BUCKET [ARN] [FLAGS] + {{.HelpName}} ALIAS/BUCKET [ARN] [FLAGS] FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/mb-main.go b/cmd/mb-main.go index c2382fbe1e..7bda23fed3 100644 --- a/cmd/mb-main.go +++ b/cmd/mb-main.go @@ -47,7 +47,6 @@ var mbCmd = cli.Command{ USAGE: {{.HelpName}} [FLAGS] TARGET [TARGET...] - {{if .VisibleFlags}} FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/policy-main.go b/cmd/policy-main.go index d869e8b289..ee9348d31c 100644 --- a/cmd/policy-main.go +++ b/cmd/policy-main.go @@ -52,7 +52,6 @@ USAGE: PERMISSION: Allowed policies are: [none, download, upload, public]. - {{if .VisibleFlags}} FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/session-main.go b/cmd/session-main.go index 8995580c6b..6b8e48150f 100644 --- a/cmd/session-main.go +++ b/cmd/session-main.go @@ -54,7 +54,6 @@ OPERATION: SESSION-ID: SESSION - Session can either be $SESSION-ID or "all". - {{if .VisibleFlags}} FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/version-main.go b/cmd/version-main.go index 7289dcdfc1..2f6e89676d 100644 --- a/cmd/version-main.go +++ b/cmd/version-main.go @@ -43,10 +43,10 @@ var versionCmd = cli.Command{ }, }, CustomHelpTemplate: `NAME: - {{.HelpName}} - {{.Usage}} + {{.HelpName}} - {{.Usage}} USAGE: - {{.HelpName}}{{if .VisibleFlags}} [FLAGS]{{end}} + {{.HelpName}}{{if .VisibleFlags}} [FLAGS]{{end}} {{if .VisibleFlags}} FLAGS: {{range .VisibleFlags}}{{.}} diff --git a/cmd/watch-main.go b/cmd/watch-main.go index 8b8bcf0145..0bc4f1ce26 100644 --- a/cmd/watch-main.go +++ b/cmd/watch-main.go @@ -65,7 +65,6 @@ var watchCmd = cli.Command{ USAGE: {{.HelpName}} [FLAGS] - {{if .VisibleFlags}} FLAGS: {{range .VisibleFlags}}{{.}}