diff --git a/etcdctlv3/README.md b/etcdctlv3/README.md index 99611d9fd..33d278a0d 100644 --- a/etcdctlv3/README.md +++ b/etcdctlv3/README.md @@ -183,7 +183,7 @@ Watch watches events stream on keys or prefixes. The watch command runs until it - hex -- print out key and value as hex encode string -- i -- begins an interactive watch session +- interactive -- begins an interactive watch session - prefix -- watch on a prefix if prefix is set. diff --git a/etcdctlv3/command/watch_command.go b/etcdctlv3/command/watch_command.go index 86717614f..025e7bf04 100644 --- a/etcdctlv3/command/watch_command.go +++ b/etcdctlv3/command/watch_command.go @@ -44,7 +44,7 @@ func NewWatchCommand() *cobra.Command { } cmd.Flags().BoolVar(&watchHex, "hex", false, "print out key and value as hex encode string for text format") - cmd.Flags().BoolVar(&watchInteractive, "i", false, "interactive mode") + cmd.Flags().BoolVarP(&watchInteractive, "interactive", "i", false, "interactive mode") cmd.Flags().BoolVar(&watchPrefix, "prefix", false, "watch on a prefix if prefix is set") cmd.Flags().Int64Var(&watchRev, "rev", 0, "revision to start watching")