kubectx icon indicating copy to clipboard operation
kubectx copied to clipboard

Autocomplete does not work when installed as Krew plugin

Open benjaminclauss opened this issue 2 years ago • 2 comments

# Enable shell completion
autoload -U compinit; compinit

# Install Krew - the package manager for kubectl plugins
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"

# https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion
source <(kubectl completion zsh)

I would expect kubectl ctx CL<tab><tab> to show CLUSTER.

benjaminclauss avatar Dec 11 '23 18:12 benjaminclauss

It's a known problem, we need to implement shell completion installation in Krew first, then make this plugin's krew distribution use it.

ahmetb avatar Jan 06 '24 00:01 ahmetb

I believe this is now possible if there were a couple of commands installed: kubectl_complete-ctx and kubectl_complete-ns

nogweii avatar Mar 06 '24 18:03 nogweii