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

[bug]: kubectl not loading when zinit snippet OMZP::kubectl #652

Open
1 task done
exic opened this issue Apr 30, 2024 · 1 comment
Open
1 task done

[bug]: kubectl not loading when zinit snippet OMZP::kubectl #652

exic opened this issue Apr 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@exic
Copy link

exic commented Apr 30, 2024

What happened?

I set up my system on Mac and found that kubectl autocompletion isn't working:

(eval):1: command not found: _kubectl

Two issues, probably:

  • kubectl plugin attempts to write to $ZSH_CACHE_DIR/completions/_kubectl, but the dir might not exist (didn't, for me)
  • zinit doesn't recognize that directory anyways? I tried setting fpath to it but that didn't help.

Steps to reproduce

  1. (install kubectl)
  2. zinit snippet OMZP::kubectl
  3. k [TAB]

Relevant output

No response

Screenshots and recordings

No response

Operating System & Version

OS: darwin23.0 | Vendor: apple | Machine: x86_64 | CPU: arm64 | Processor: arm | Hardware: arm64

Zsh version

zsh 5.9 (x86_64-apple-darwin23.0)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

https://github.com/ohmyzsh/ohmyzsh/blob/master/oh-my-zsh.sh#L65
https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/kubectl/kubectl.plugin.zsh#L13

https://github.com/zdharma-continuum/CODE_OF_CONDUCT.md isn't available btw., but I agree to follow ;-)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@exic exic added the bug Something isn't working label Apr 30, 2024
@AbaoFromCUG
Copy link

Same for me, when use zinit snippet OMZP::docker, related issue in ohmyzsh/ohmyzsh#11866

Possible solution, do some thing like ohmyzsh: create $ZSH_CACHE_DIR/completions and add to fpath, refer to https://github.com/ohmyzsh/ohmyzsh/blob/2ef7c73cc884163367279e4b586136e3335b1c53/oh-my-zsh.sh#L56-L57

gotgenes added a commit to gotgenes/dotfiles that referenced this issue Jun 20, 2024
Whoops.

Completion for the aliases like kj does not work. This might be related
to this issue.
zdharma-continuum/zinit#652
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants