Skip to content

Commit

Permalink
Capitalize short desc for completion command
Browse files Browse the repository at this point in the history
  • Loading branch information
fcjr committed Jul 12, 2021
1 parent de187e8 commit 338a1cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions completions.go
Expand Up @@ -589,7 +589,7 @@ func (c *Command) initDefaultCompletionCmd() {

completionCmd := &Command{
Use: compCmdName,
Short: "generate the autocompletion script for the specified shell",
Short: "Generate the autocompletion script for the specified shell",
Long: fmt.Sprintf(`
Generate the autocompletion script for %[1]s for the specified shell.
See each sub-command's help for details on how to use the generated script.
Expand All @@ -601,7 +601,7 @@ See each sub-command's help for details on how to use the generated script.

out := c.OutOrStdout()
noDesc := c.CompletionOptions.DisableDescriptions
shortDesc := "generate the autocompletion script for %s"
shortDesc := "Generate the autocompletion script for %s"
bash := &Command{
Use: "bash",
Short: fmt.Sprintf(shortDesc, "bash"),
Expand Down
4 changes: 2 additions & 2 deletions completions_test.go
Expand Up @@ -125,7 +125,7 @@ func TestCmdNameCompletionInGo(t *testing.T) {

expected = strings.Join([]string{
"aliased\tA command with aliases",
"completion\tgenerate the autocompletion script for the specified shell",
"completion\tGenerate the autocompletion script for the specified shell",
"firstChild\tFirst command",
"help\tHelp about any command",
"secondChild",
Expand Down Expand Up @@ -580,7 +580,7 @@ func TestFlagNameCompletionInGoWithDesc(t *testing.T) {

expected := strings.Join([]string{
"childCmd\tfirst command",
"completion\tgenerate the autocompletion script for the specified shell",
"completion\tGenerate the autocompletion script for the specified shell",
"help\tHelp about any command",
":4",
"Completion ended with directive: ShellCompDirectiveNoFileComp", ""}, "\n")
Expand Down

0 comments on commit 338a1cf

Please sign in to comment.