diff --git a/etcdctl/ctlv3/command/completion_command.go b/etcdctl/ctlv3/command/completion_command.go index 66a213cd3a6..cb98d4a7d69 100644 --- a/etcdctl/ctlv3/command/completion_command.go +++ b/etcdctl/ctlv3/command/completion_command.go @@ -65,7 +65,7 @@ PowerShell: `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, - Args: cobra.ExactValidArgs(1), + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash": diff --git a/etcdutl/etcdutl/completion_commmand.go b/etcdutl/etcdutl/completion_commmand.go index 792799b15b0..b723337e1a8 100644 --- a/etcdutl/etcdutl/completion_commmand.go +++ b/etcdutl/etcdutl/completion_commmand.go @@ -65,7 +65,7 @@ PowerShell: `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, - Args: cobra.ExactValidArgs(1), + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash":