Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete does not work when installed as Krew plugin #410

Open
benjaminclauss opened this issue Dec 11, 2023 · 2 comments
Open

Autocomplete does not work when installed as Krew plugin #410

benjaminclauss opened this issue Dec 11, 2023 · 2 comments

Comments

@benjaminclauss
Copy link

# 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.

@ahmetb
Copy link
Owner

ahmetb commented Jan 6, 2024

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

@nogweii
Copy link

nogweii commented Mar 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants