Merge pull request #88165 from brianpursley/kubectl-125

Fix bug where kubectl completion zsh returns nonzero exit code
This commit is contained in:
Kubernetes Prow Robot 2020-03-18 22:22:44 -07:00 committed by GitHub
commit 73a7fdcd2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,8 +157,6 @@ func runCompletionZsh(out io.Writer, boilerPlate string, kubectl *cobra.Command)
zshInitialization := ` zshInitialization := `
__kubectl_bash_source() { __kubectl_bash_source() {
alias shopt=':' alias shopt=':'
alias _expand=_bash_expand
alias _complete=_bash_comp
emulate -L sh emulate -L sh
setopt kshglob noshglob braceexpand setopt kshglob noshglob braceexpand
@ -307,7 +305,6 @@ BASH_COMPLETION_EOF
} }
__kubectl_bash_source <(__kubectl_convert_bash_to_zsh) __kubectl_bash_source <(__kubectl_convert_bash_to_zsh)
_complete kubectl 2>/dev/null
` `
out.Write([]byte(zshTail)) out.Write([]byte(zshTail))
return nil return nil