diff --git a/cmd/config/get_authinfo.go b/cmd/config/get_authinfo.go index 80f2a6e5a..3e40f45b9 100644 --- a/cmd/config/get_authinfo.go +++ b/cmd/config/get_authinfo.go @@ -36,7 +36,7 @@ credentials if no name is provided. airshipctl config get-credentials # Display a specific user's credentials -airshipctl config get-credentials exampleUser +airshipctl config get-credential exampleUser ` ) @@ -45,10 +45,11 @@ airshipctl config get-credentials exampleUser func NewGetAuthInfoCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command { o := &config.AuthInfoOptions{} cmd := &cobra.Command{ - Use: "get-credentials [NAME]", + Use: "get-credential [NAME]", Short: "Get user credentials from the airshipctl config", Long: getAuthInfoLong[1:], Example: getAuthInfoExample, + Aliases: []string{"get-credentials"}, Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { airconfig := rootSettings.Config diff --git a/cmd/config/get_cluster.go b/cmd/config/get_cluster.go index 45d1696c0..ee3380386 100644 --- a/cmd/config/get_cluster.go +++ b/cmd/config/get_cluster.go @@ -36,7 +36,7 @@ Valid values for the --cluster-type flag are [ephemeral|target]. getClusterExample = ` # List all clusters -airshipctl config get-cluster +airshipctl config get-clusters # Display a specific cluster airshipctl config get-cluster --cluster-type=ephemeral exampleCluster @@ -52,6 +52,7 @@ func NewGetClusterCommand(rootSettings *environment.AirshipCTLSettings) *cobra.C Short: "Get cluster information from the airshipctl config", Long: getClusterLong[1:], Example: getClusterExample, + Aliases: []string{"get-clusters"}, RunE: func(cmd *cobra.Command, args []string) error { airconfig := rootSettings.Config if len(args) == 1 { diff --git a/cmd/config/get_context.go b/cmd/config/get_context.go index b49377b95..f34235848 100644 --- a/cmd/config/get_context.go +++ b/cmd/config/get_context.go @@ -32,7 +32,7 @@ Display information about contexts such as associated manifests, users, and clus getContextExample = ` # List all contexts -airshipctl config get-context +airshipctl config get-contexts # Display the current context airshipctl config get-context --current @@ -51,6 +51,7 @@ func NewGetContextCommand(rootSettings *environment.AirshipCTLSettings) *cobra.C Short: "Get context information from the airshipctl config", Long: getContextLong[1:], Example: getContextExample, + Aliases: []string{"get-contexts"}, RunE: func(cmd *cobra.Command, args []string) error { airconfig := rootSettings.Config if len(args) == 1 { diff --git a/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden b/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden index 0dfeaf259..dfb58713f 100644 --- a/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden +++ b/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden @@ -6,7 +6,7 @@ Usage: Available Commands: get-cluster Get cluster information from the airshipctl config get-context Get context information from the airshipctl config - get-credentials Get user credentials from the airshipctl config + get-credential Get user credentials from the airshipctl config help Help about any command import Merge information from a kubernetes config file init Generate initial configuration files for airshipctl diff --git a/cmd/config/testdata/TestGetAuthInfoCmdGoldenOutput/missing.golden b/cmd/config/testdata/TestGetAuthInfoCmdGoldenOutput/missing.golden index 252b86b55..e1adbcd0b 100644 --- a/cmd/config/testdata/TestGetAuthInfoCmdGoldenOutput/missing.golden +++ b/cmd/config/testdata/TestGetAuthInfoCmdGoldenOutput/missing.golden @@ -1,6 +1,9 @@ Error: Missing configuration: User credentials with name 'authinfoMissing' Usage: - get-credentials [NAME] [flags] + get-credential [NAME] [flags] + +Aliases: + get-credential, get-credentials Examples: @@ -8,9 +11,9 @@ Examples: airshipctl config get-credentials # Display a specific user's credentials -airshipctl config get-credentials exampleUser +airshipctl config get-credential exampleUser Flags: - -h, --help help for get-credentials + -h, --help help for get-credential diff --git a/cmd/config/testdata/TestGetClusterCmdGoldenOutput/missing.golden b/cmd/config/testdata/TestGetClusterCmdGoldenOutput/missing.golden index a84b46faf..946e574d6 100644 --- a/cmd/config/testdata/TestGetClusterCmdGoldenOutput/missing.golden +++ b/cmd/config/testdata/TestGetClusterCmdGoldenOutput/missing.golden @@ -2,10 +2,13 @@ Error: Missing configuration: Cluster with name 'clusterMissing' of type 'target Usage: get-cluster [NAME] [flags] +Aliases: + get-cluster, get-clusters + Examples: # List all clusters -airshipctl config get-cluster +airshipctl config get-clusters # Display a specific cluster airshipctl config get-cluster --cluster-type=ephemeral exampleCluster diff --git a/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden b/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden index fc4ccbd77..4c563cf06 100644 --- a/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden +++ b/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden @@ -2,10 +2,13 @@ Error: Missing configuration: Context with name 'contextMissing' Usage: get-context [NAME] [flags] +Aliases: + get-context, get-contexts + Examples: # List all contexts -airshipctl config get-context +airshipctl config get-contexts # Display the current context airshipctl config get-context --current