Skip to content

Commit b249df4

Browse files
authored
Merge pull request #1775 from Adirio/command-suggestions
✨Suggestions for create and alpha commands
2 parents b8e9a8f + 7352cfe commit b249df4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pkg/cli/alpha.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import (
2424

2525
func (c *cli) newAlphaCmd() *cobra.Command {
2626
return &cobra.Command{
27-
Use: "alpha",
28-
Short: "Expose commands which are in experimental or early stages of development",
29-
Long: `Command group for commands which are either experimental or in early stages of development`,
27+
Use: "alpha",
28+
SuggestFor: []string{"experimental"},
29+
Short: "Expose commands which are in experimental or early stages of development",
30+
Long: `Command group for commands which are either experimental or in early stages of development`,
3031
Example: fmt.Sprintf(`
3132
# scaffolds webhook server
3233
%s alpha webhook <params>`,

pkg/cli/create.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ import (
2222

2323
func (c *cli) newCreateCmd() *cobra.Command {
2424
return &cobra.Command{
25-
Use: "create",
26-
Short: "Scaffold a Kubernetes API or webhook",
27-
Long: `Scaffold a Kubernetes API or webhook.`,
25+
Use: "create",
26+
SuggestFor: []string{"new"},
27+
Short: "Scaffold a Kubernetes API or webhook",
28+
Long: `Scaffold a Kubernetes API or webhook.`,
2829
}
2930
}

0 commit comments

Comments
 (0)