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

zsh completion missing __start_kubectl #1135

Closed
glanchow opened this issue Oct 22, 2021 · 4 comments
Closed

zsh completion missing __start_kubectl #1135

glanchow opened this issue Oct 22, 2021 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@glanchow
Copy link

The zsh completion is not working for me in v1.22.0 or (stable) v1.22.2
I'm not sure if it's normal or a bug, here's the description.

curl -LO "https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl"
./kubectl completion zsh | grep __start
== NOTHING ==
curl -LO "https://dl.k8s.io/release/v1.21.0/bin/linux/amd64/kubectl"
./kubectl completion zsh | grep __start
== OK ==
__start_kubectl()
@glanchow glanchow added the kind/bug Categorizes issue or PR as related to a bug. label Oct 22, 2021
@k8s-ci-robot
Copy link
Contributor

@glanchow: This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 22, 2021
@lauchokyip
Copy link
Member

@marckhouzam can you take a look at this?

@marckhouzam
Copy link
Member

@glanchow With kubectl 1.22, zsh completion is now native (no longer using the bash compatibility approach). It is therefore normal not to find the _start string in the script.

Can you describe what you do to setup completion so we can understand why it does not work?

If it helps, the help for the command mentions:

  # Load the kubectl completion code for zsh[1] into the current shell
  source <(kubectl completion zsh)
  # Set the kubectl completion code for zsh[1] to autoload on startup
  kubectl completion zsh > "${fpath[1]}/_kubectl"

@glanchow
Copy link
Author

Hello,
Yes I had this line for months in my .zshrc source <(kubectl completion zsh)
I made dozen of tests this morning before creating an issue, but now it works..
It looks that I just had to re-open my terminals..
Sorry and thank you for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

4 participants