-
Notifications
You must be signed in to change notification settings - Fork 102
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
Added basic autocompletion for zsh. (#34) #175
base: master
Are you sure you want to change the base?
Conversation
Hi, I'm getting
with |
@mhkarimi1383 I don't get such error. Make sure you're first on a context though. |
I don't have a zsh setup to test but if someone with zsh can vouch for this I can merge it. |
Thanks juanmirocks Co-authored-by: Dr. Juan Miguel Cejuela <[email protected]>
I have an active kubernetes context |
Thanks for providing a fix @juanmirocks! I had a local version with compdef in the script, but it was missing in the pushed version.
Are you in a active kubernetes context within kubie? As in, have you typed kubie ctx, picked a cluster and then tried the autocomplete? |
@antring That was my fault :) |
```bash | ||
cp .completion/kubie.zsh ~/.zsh/completions | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can add extra notes for oh-my-zsh
cp .completion/kubie.zsh ${ZSH}/custom/completions/_kubie.zsh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done some steps but it's not working for me.
kubie ns
autocomplete is not working for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autocomplete for kubie
itself is also not working
Autocomplete with Zsh can either be installed by sourcing the file eg.: | ||
|
||
```bash | ||
source ./completion/kubie.zsh | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this will work for the current session ONLY. So it's not the solution or otherwise it should be properly noted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be added to the zsh profile (e.g. ~/.zshrc).
Then it will be valid for all sessions.
@mhkarimi1383 the autocompletions are working for me just fine (also for |
Can confirm that it works, and I guess this is not the scope of this specific task but would be nice to have this built-in with command like |
ey, anything stopping this branch to be merged? |
Co-authored-by: Dr. Juan Miguel Cejuela <[email protected]>
Co-authored-by: Dr. Juan Miguel Cejuela <[email protected]>
As far as I know it should be fine to merge. I have been using this at work for months. |
Bump - also looking for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this PR with zsh.
I can confirm BASIC usage works, but as this PR was submitted back in October 2023 it's missing the following commands:
export
, delete
, update
Also, it doesn't provide "deeper" auto-completions, e.g:
kubie info <command>
@antring First of all, thank you for this PR ! :)
Are you into updating this PR? If not, I can make the changes....
You need to choose a kubie context (via |
No description provided.