diff --git a/components/cluster/command/check.go b/components/cluster/command/check.go index c21adca0d6..725cb96c27 100644 --- a/components/cluster/command/check.go +++ b/components/cluster/command/check.go @@ -107,7 +107,7 @@ conflict checks with other clusters`, }, } - cmd.Flags().StringVar(&opt.user, "user", tiuputils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") + cmd.Flags().StringVarP(&opt.user, "user", "u", tiuputils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") cmd.Flags().StringVarP(&opt.identityFile, "identity_file", "i", opt.identityFile, "The path of the SSH identity file. If specified, public key authentication will be used.") cmd.Flags().BoolVarP(&opt.usePassword, "password", "p", false, "Use password of target hosts. If specified, password authentication will be used.") diff --git a/components/cluster/command/deploy.go b/components/cluster/command/deploy.go index 9d3c82c1aa..e9de5eb1e7 100644 --- a/components/cluster/command/deploy.go +++ b/components/cluster/command/deploy.go @@ -103,7 +103,7 @@ func newDeploy() *cobra.Command { }, } - cmd.Flags().StringVar(&opt.user, "user", tiuputils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") + cmd.Flags().StringVarP(&opt.user, "user", "u", tiuputils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") cmd.Flags().StringVarP(&opt.identityFile, "identity_file", "i", opt.identityFile, "The path of the SSH identity file. If specified, public key authentication will be used.") cmd.Flags().BoolVarP(&opt.usePassword, "password", "p", false, "Use password of target hosts. If specified, password authentication will be used.") cmd.Flags().BoolVarP(&opt.ignoreConfigCheck, "ignore-config-check", "", opt.ignoreConfigCheck, "Ignore the config check result") diff --git a/components/cluster/command/scale_out.go b/components/cluster/command/scale_out.go index ae72d34b61..becbc85b34 100644 --- a/components/cluster/command/scale_out.go +++ b/components/cluster/command/scale_out.go @@ -63,7 +63,7 @@ func newScaleOutCmd() *cobra.Command { }, } - cmd.Flags().StringVar(&opt.user, "user", tiuputils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") + cmd.Flags().StringVarP(&opt.user, "user", "u", tiuputils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") cmd.Flags().StringVarP(&opt.identityFile, "identity_file", "i", opt.identityFile, "The path of the SSH identity file. If specified, public key authentication will be used.") cmd.Flags().BoolVarP(&opt.usePassword, "password", "p", false, "Use password of target hosts. If specified, password authentication will be used.")