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

Autocompletion for some plugins fails: (eval):1: _kubectl: function definition file not found #590

Open
willbowditch opened this issue Aug 21, 2023 · 2 comments

Comments

@willbowditch
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Install zplug with homebrew
  2. Add kubectl plugin
export ZPLUG_USE_CACHE=true
export ZPLUG_HOME=/opt/homebrew/opt/zplug
source $ZPLUG_HOME/init.zsh

zplug "plugins/kubectl", from:oh-my-zsh

if ! zplug check; then
    zplug install
fi

zplug load --verbose
  1. Enter kubectl and TAB for a completion, the error reads:
(eval):1: _kubectl: function definition file not found

Expected behavior

Autocompletion should work.

Env (please complete the following information):

  • zplug version: 2.4.2
  • zsh --version: zsh 5.9 (arm-apple-darwin22.1.0)
  • uname -a: Darwin M-R7J7LL2169 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:19:12 PDT 2022; root:xnu-8792.41.9~3/RELEASE_ARM64_T6020 arm64

Minimal zshrc (with less than 30 lines)

export ZPLUG_USE_CACHE=true
export ZPLUG_HOME=/opt/homebrew/opt/zplug
source $ZPLUG_HOME/init.zsh

zplug "plugins/kubectl", from:oh-my-zsh

if ! zplug check; then
    zplug install
fi

zplug load --verbose
@ckeeney
Copy link

ckeeney commented May 10, 2024

I just started encountering this issue the other day. Is there a workaround?

@Taluu
Copy link

Taluu commented May 11, 2024

I also had the problem, I ended up sourcing the kubectl completion file by hand whenever I need it. I think it's on kube's side, but I'm not really sure though.

I mean, even if I use zsh's function completion (by setting the fpath variable and adding a path to zsh completions), I have this error

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

No branches or pull requests

3 participants