Enable shell completion descriptions for bash

Cobra provides support for completion descriptions for bash.
It was turned off because of a bug with certain bash menu options which
have been fixed by Cobra 1.3.0.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

Kubernetes-commit: d72926d4915133550e41de1252fe2a4aa0aa3745
This commit is contained in:
Marc Khouzam 2022-11-04 16:57:24 -04:00 committed by Kubernetes Publisher
parent 4be4703aaa
commit 4cdd516e3b
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ func runCompletionBash(out io.Writer, boilerPlate string, kubectl *cobra.Command
return err return err
} }
return kubectl.GenBashCompletionV2(out, false) // TODO: Upgrade to Cobra 1.3.0 or later before including descriptions (See https://github.com/spf13/cobra/pull/1509) return kubectl.GenBashCompletionV2(out, true)
} }
func runCompletionZsh(out io.Writer, boilerPlate string, kubectl *cobra.Command) error { func runCompletionZsh(out io.Writer, boilerPlate string, kubectl *cobra.Command) error {