Skip to content

Commit

Permalink
Merge pull request #4015 from jat001/patch-1
Browse files Browse the repository at this point in the history
```#compdef``` must be the first line
  • Loading branch information
k8s-ci-robot committed Mar 28, 2019
2 parents b189947 + f64b343 commit 9b8e3ed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmd/minikube/cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ func GenerateBashCompletion(w io.Writer, cmd *cobra.Command) error {

// GenerateZshCompletion generates the completion for the zsh shell
func GenerateZshCompletion(out io.Writer, cmd *cobra.Command) error {
zshInitialization := `#compdef minikube
zshAutoloadTag := `#compdef minikube
`

zshInitialization := `
__minikube_bash_source() {
alias shopt=':'
alias _expand=_bash_expand
Expand Down Expand Up @@ -239,7 +241,12 @@ __minikube_convert_bash_to_zsh() {
<<'BASH_COMPLETION_EOF'
`

_, err := out.Write([]byte(boilerPlate))
_, err := out.Write([]byte(zshAutoloadTag))
if err != nil {
return err
}

_, err = out.Write([]byte(boilerPlate))
if err != nil {
return err
}
Expand Down

0 comments on commit 9b8e3ed

Please sign in to comment.