Replace hardcoded kubectl with kubectl.Name()

Kubernetes-commit: 77be26c3b83dd28be450c8790ecee823750f9a8c
This commit is contained in:
Paul Barfuss 2021-12-10 15:58:52 -05:00 committed by Kubernetes Publisher
parent 9b4102b899
commit 0208a3ee09
1 changed files with 1 additions and 2 deletions

View File

@ -171,8 +171,7 @@ func runCompletionBash(out io.Writer, boilerPlate string, kubectl *cobra.Command
}
func runCompletionZsh(out io.Writer, boilerPlate string, kubectl *cobra.Command) error {
commandName := kubectl.Name()
zshHead := fmt.Sprintf("#compdef %[1]s\ncompdef _%[1]s %[1]s\n", commandName)
zshHead := fmt.Sprintf("#compdef %[1]s\ncompdef _%[1]s %[1]s\n", kubectl.Name())
out.Write([]byte(zshHead))
if len(boilerPlate) == 0 {