From a6a69d2bcc2c1798ff81633a558e871618e851b7 Mon Sep 17 00:00:00 2001 From: arnold-keyvalue Date: Mon, 22 Aug 2022 13:46:28 +0530 Subject: [PATCH] add: shorthand flags --- cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index c3b5fe7..f743d93 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -54,6 +54,6 @@ func Execute() { func init() { rootCmd.AddCommand(disconnectCmd, connectCmd) - connectCmd.PersistentFlags().String("env", "dev", "environment\nSupported environments: dev, staging, prod\n") - connectCmd.PersistentFlags().Int("port", 5432, "port") + connectCmd.PersistentFlags().StringP("env", "e", "dev", "environment\nSupported environments: dev, staging, prod\n") + connectCmd.PersistentFlags().IntP("port", "p", 5432, "port") }