Replace hardcoded kubectl with kubectl.Name()
This commit is contained in:
@@ -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 {
|
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", kubectl.Name())
|
||||||
zshHead := fmt.Sprintf("#compdef %[1]s\ncompdef _%[1]s %[1]s\n", commandName)
|
|
||||||
out.Write([]byte(zshHead))
|
out.Write([]byte(zshHead))
|
||||||
|
|
||||||
if len(boilerPlate) == 0 {
|
if len(boilerPlate) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user