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

clusterctl completion: Use native zsh completion instead #4090

Closed
superbrothers opened this issue Jan 20, 2021 · 2 comments · Fixed by #4113
Closed

clusterctl completion: Use native zsh completion instead #4090

superbrothers opened this issue Jan 20, 2021 · 2 comments · Fixed by #4113
Labels
area/clusterctl Issues or PRs related to clusterctl kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@superbrothers
Copy link
Contributor

User Story

As a developer I would like to use native zsh completion instead of the bash-compatibility one for making it easier to maintain.

Detailed Description

The current zsh completion of clusterctl is achieved by replacing some of the bash completions. Only a limited number of developers can maintain it because it is difficult to understand how it works.

Since cobra has supported native zsh completion since v1.1, we can replace it with this and it will be much easier to maintain. In addition, we will be ready to provide complements to other shells such as fish in the future.

Anything else you would like to add:

The native zsh completion provided by cobra does not support the use of completion in the following method:

source <(clusterctl completion zsh)

Instead, we should do the following. clusterctl completion's help message suggests the above method is available and will require the user to make changes.

$ clusterctl completion zsh > "${fpath[1]}/_clusterctl"

/kind feature
/area clusterctl

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. area/clusterctl Issues or PRs related to clusterctl labels Jan 20, 2021
@fabriziopandini
Copy link
Member

/milestone v0.4.0

@k8s-ci-robot k8s-ci-robot added this to the v0.4.0 milestone Jan 20, 2021
@vincepri
Copy link
Member

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants