kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.16k stars 4.87k forks source link

Autocomplete: __minikube_handle_flag:29: bad math expression: operand expected at end of string #19083

Open RobbeVW opened 2 months ago

RobbeVW commented 2 months ago

What Happened?

After installing autocomplete for ZSH, autocompletion throws __minikube_handle_flag:29: bad math expression: operand expected at end of string

    $ minikube completion zsh > ~/.minikube-completion  # for zsh users
    $ source ~/.minikube-completion

.zshrc


autoload -Uz compinit
compinit

# Load Angular CLI autocompletion.
source <(ng completion script)

# Minikube
source <(minikube completion zsh)  # This ensures Minikube completion is sourced
source <(kubectl completion zsh)

alias kubectl="minikube kubectl --"
alias k="minikube kubectl --"

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/robbe.vanwortswinkel/Documents/google-cloud-sdk 2/path.zsh.inc' ]; then . '/Users/robbe.vanwortswinkel/Documents/google-cloud-sdk 2/path.zsh.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/Users/robbe.vanwortswinkel/Documents/google-cloud-sdk 2/completion.zsh.inc' ]; then . '/Users/robbe.vanwortswinkel/Documents/google-cloud-sdk 2/completion.zsh.inc'; fi

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

Docker

wgzhao commented 3 weeks ago

I met the same error