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

Added basic autocompletion for zsh. (#34) #175

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

antring
Copy link

@antring antring commented Oct 18, 2023

No description provided.

@mhkarimi1383
Copy link

@antring

Hi,

I'm getting

Error: Not in a kubie shell

with kubie ns

completion/kubie.zsh Show resolved Hide resolved
@juanmirocks
Copy link

@mhkarimi1383 I don't get such error. Make sure you're first on a context though.

@sbstp
Copy link
Owner

sbstp commented Jan 5, 2024

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 <s+github.rv2ujj4ir3@juanmi.rocks>
@mhkarimi1383
Copy link

@mhkarimi1383 I don't get such error. Make sure you're first on a context though.

I have an active kubernetes context

@antring
Copy link
Author

antring commented Jan 7, 2024

Thanks for providing a fix @juanmirocks! I had a local version with compdef in the script, but it was missing in the pushed version.

@mhkarimi1383 I don't get such error. Make sure you're first on a context though.

I have an active kubernetes context

Are you in a active kubernetes context within kubie? As in, have you typed kubie ctx, picked a cluster and then tried the autocomplete?
I am unable to produce the error on my end. Could you provide more information?

@mhkarimi1383
Copy link

@antring That was my fault :)

```bash
cp .completion/kubie.zsh ~/.zsh/completions
```

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

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

Copy link

@mhkarimi1383 mhkarimi1383 Jan 8, 2024

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

Comment on lines +70 to +74
Autocomplete with Zsh can either be installed by sourcing the file eg.:

```bash
source ./completion/kubie.zsh
```

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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@juanmirocks
Copy link

@mhkarimi1383 the autocompletions are working for me just fine (also for kubie ns and for kubie itself). I've added some suggestions above to clarify how to make it work. More specific steps can be given if needed.

@janpuc
Copy link

janpuc commented Feb 16, 2024

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 kubie completions [bash|fish|zsh].

@miguelchicoespin
Copy link

ey, anything stopping this branch to be merged?

antring and others added 2 commits June 10, 2024 22:33
Co-authored-by: Dr. Juan Miguel Cejuela <s+github.rv2ujj4ir3@juanmi.rocks>
Co-authored-by: Dr. Juan Miguel Cejuela <s+github.rv2ujj4ir3@juanmi.rocks>
@antring
Copy link
Author

antring commented Jun 10, 2024

As far as I know it should be fine to merge. I have been using this at work for months.

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

Successfully merging this pull request may close these issues.

None yet

6 participants