From 38d614f3bb003b391e5c962778c1df25264ac026 Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Sat, 31 Jan 2015 21:33:26 +0530 Subject: [PATCH 1/2] Minor English correction --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index a3a01ad5..2cd9da26 100644 --- a/command.go +++ b/command.go @@ -205,7 +205,7 @@ Available Commands: {{range .Commands}}{{if .Runnable}} Additional help topics: {{if gt .Commands 0 }}{{range .Commands}}{{if not .Runnable}} {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if gt .Parent.Commands 1 }}{{range .Parent.Commands}}{{if .Runnable}}{{if not (eq .Name $cmd.Name) }}{{end}} {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{end}} {{end}}{{ if .HasSubCommands }} -Use "{{.Root.Name}} help [command]" for more information about that command. +Use "{{.Root.Name}} help [command]" for more information about a command. {{end}}` } } From 65f466c09fe4b232f4c3247aac2ec95f8b864794 Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Sat, 31 Jan 2015 21:38:05 +0530 Subject: [PATCH 2/2] Updated test corresponding to #49 --- cobra_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cobra_test.go b/cobra_test.go index dd44812c..5c98a603 100644 --- a/cobra_test.go +++ b/cobra_test.go @@ -461,7 +461,7 @@ func TestRootHelp(t *testing.T) { x := fullSetupTest("--help") checkResultContains(t, x, "Available Commands:") - checkResultContains(t, x, "for more information about that command") + checkResultContains(t, x, "for more information about a command") if strings.Contains(x.Output, "unknown flag: --help") { t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) @@ -470,7 +470,7 @@ func TestRootHelp(t *testing.T) { x = fullSetupTest("echo --help") checkResultContains(t, x, "Available Commands:") - checkResultContains(t, x, "for more information about that command") + checkResultContains(t, x, "for more information about a command") if strings.Contains(x.Output, "unknown flag: --help") { t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) @@ -482,7 +482,7 @@ func TestRootNoCommandHelp(t *testing.T) { x := rootOnlySetupTest("--help") checkResultOmits(t, x, "Available Commands:") - checkResultOmits(t, x, "for more information about that command") + checkResultOmits(t, x, "for more information about a command") if strings.Contains(x.Output, "unknown flag: --help") { t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) @@ -491,7 +491,7 @@ func TestRootNoCommandHelp(t *testing.T) { x = rootOnlySetupTest("echo --help") checkResultOmits(t, x, "Available Commands:") - checkResultOmits(t, x, "for more information about that command") + checkResultOmits(t, x, "for more information about a command") if strings.Contains(x.Output, "unknown flag: --help") { t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output)