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

command not found: compdef #205

Open
TribuneX opened this issue Apr 9, 2023 · 3 comments
Open

command not found: compdef #205

TribuneX opened this issue Apr 9, 2023 · 3 comments

Comments

@TribuneX
Copy link

TribuneX commented Apr 9, 2023

What did you expect to happen?
I added enhancd via antidote:

# in my plugins.txt
b4b4r07/enhancd

What actually happened?
I am getting the following error when opening a new zsh shell:

Output

/Users/xx/Library/Caches/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-b4b4r07-SLASH-enhancd/enhancd.plugin.zsh:28: command not found: compdef

Additional context
I initialized the completion system in my .zshrc based on the suggestion:

autoload -Uz compinit && compinit

But I need to call compinit after the plugins.sh was sourced, since I also load plugins (e.g. docker or kubectl) which include their own auto completion definitions.
Calling compinit before sourcing enhancd and again after sourceing all other plugins works, but slows down my zsh shell start.

Any suggestion on how to solve this? The issue should be reproducable with my dotfiles.

TribuneX added a commit to TribuneX/dotfiles that referenced this issue Apr 9, 2023
@babarot
Copy link
Owner

babarot commented Apr 10, 2023

Thank you for raising the issue. I'll take a look this until this weekend

@GeorgeGedox
Copy link

Just wanted to say that I also see the same behavior on darwin, on linux it works without issues, seems to be only a problem with darwin systems

@vrano714
Copy link

vrano714 commented Nov 20, 2024

Hi still not solved?

I encoundered the same thing.
For my configuration, deferred loading solved this problem.
(compinit should run first)

I'm using sheldon as plugin manager.
I just add apply = ["defer"] in the enhancd section of plugins.toml (deferred loading setting can be found in sheldon docs)

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

4 participants