From 05471d382748968e53eb7ab5c8eefffe840e5d31 Mon Sep 17 00:00:00 2001
From: Evgenii Stratonikov <e.stratonikov@yadro.com>
Date: Thu, 2 Mar 2023 14:25:02 +0300
Subject: [PATCH] [#83] util/autocomplete: Fix deprecated warning

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
---
 pkg/util/autocomplete/autocomplete.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/util/autocomplete/autocomplete.go b/pkg/util/autocomplete/autocomplete.go
index 896244711..4da8ecbfc 100644
--- a/pkg/util/autocomplete/autocomplete.go
+++ b/pkg/util/autocomplete/autocomplete.go
@@ -43,7 +43,7 @@ func Command(name string) *cobra.Command {
 			name, name, name, name, name, name, name, name, name, name),
 		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":