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

Add zsh completion for kubectl #23797

Merged
merged 1 commit into from
Apr 3, 2016

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Apr 3, 2016

This is based on the zsh emulation of the bash completion system (compare bashcompinit at http://zsh.sourceforge.net/Doc/Release/Completion-System.html). Because this emulation is not 100% complete, a number of functions are added or extended to work with the bash completion of kubectl.

@sttts sttts changed the title Add zsh completion for kubectl WIP: Add zsh completion for kubectl Apr 3, 2016
@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 3, 2016
@k8s-github-robot
Copy link

Labelling this PR as size/L

@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2016

@eparis we have a license conflict here I guess.

@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2016

Will rewrite the _init_completion function without the GPL dependency.

@k8s-bot
Copy link

k8s-bot commented Apr 3, 2016

GCE e2e build/test passed for commit b5cd0dea35922339dde2368427cb554fe259680e.

@sttts sttts force-pushed the sttts-zsh-completion branch from b5cd0de to 7fea3fd Compare April 3, 2016 10:54
@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2016

Replaced __kubectl_get_comp_words_by_ref with a trivial implementation. Luckily, we don't use any excluded characters from COMP_WORDBREAKS. Switched license to Apache.

@sttts sttts changed the title WIP: Add zsh completion for kubectl Add zsh completion for kubectl Apr 3, 2016
@k8s-bot
Copy link

k8s-bot commented Apr 3, 2016

GCE e2e build/test passed for commit 7fea3fd.

@eparis eparis added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. e2e-not-required and removed release-note-label-needed labels Apr 3, 2016
@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 5470488 into kubernetes:master Apr 3, 2016
@elipapa
Copy link
Contributor

elipapa commented Dec 5, 2016

To get this working on my zsh 5.2 returning a

zsh: unknown file attribute: k

I had to change $@ to ${*} in its first occurence.

@sttts
Copy link
Contributor Author

sttts commented Dec 5, 2016

@elipapa do you have a patch or PR fixing this? Which $@ do you mean?

@elipapa
Copy link
Contributor

elipapa commented Dec 5, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants