diff --git a/cmd/client.go b/cmd/client.go index 0a52479..fba8423 100644 --- a/cmd/client.go +++ b/cmd/client.go @@ -41,8 +41,8 @@ func init() { // Cobra supports Persistent Flags which will work for this command // and all subcommands, e.g.: // clientCmd.PersistentFlags().String("foo", "", "A help for foo") - clientCmd.PersistentFlags().String("ip", "", "Server IP to connect to") - clientCmd.PersistentFlags().String("port", "1302", "Server port to connect to") + clientCmd.PersistentFlags().StringP("ip", "i", "", "Server IP to connect to") + clientCmd.PersistentFlags().StringP("port", "p", "1302", "Server port to connect to") // Cobra supports local flags which will only run when this command // is called directly, e.g.: diff --git a/cmd/server.go b/cmd/server.go index 2b13d0a..7e2903a 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -36,8 +36,8 @@ func init() { // Cobra supports Persistent Flags which will work for this command // and all subcommands, e.g.: // serverCmd.PersistentFlags().String("foo", "", "A help for foo") - serverCmd.PersistentFlags().String("port", "1302", "port to use for listening") - serverCmd.PersistentFlags().String("history", "", "File to store and recover chat history from") + serverCmd.PersistentFlags().StringP("port", "p", "1302", "port to use for listening") + serverCmd.PersistentFlags().StringP("history", "r", "", "File to store and recover chat history from") // Cobra supports local flags which will only run when this command // is called directly, e.g.: