unixorn / 1password-op.plugin.zsh

ZSH plugin to load completions and aliases for 1Password's `op` tool
Apache License 2.0
10 stars 1 forks source link

[BUG] Not working with zimfw #4

Open unixorn opened 2 years ago

unixorn commented 2 years ago

Describe the bug Doesn't load completions with zimfw

To Reproduce

Add zmodule unixorn/1password-op.plugin.zsh to .zimrc, watch it not load the completions

lrosenman commented 2 years ago

trying to just source the plugin doesn't work either.

If I add this line to my .zshrc it works: eval "$(op completion zsh)"; compdef _op op

No clue why this doesn't work. :(

psnelgrove-r7 commented 1 year ago

I was playing around with getting rid of oh-my-zsh because it was a drag on my terminal load times. I ran into this same error once I removed it.

My first guess was that oh-my-zsh was doing something special setting up the compdef function. Sure enough I found this SO post.

https://unix.stackexchange.com/questions/339954/zsh-command-not-found-compinstall-compinit-compdef

I did the following and I'm up and running

autoload -Uz compinit
compinit
eval "$(op completion zsh)"; compdef _op op
unixorn commented 1 year ago

Thanks for the fix description, I have omz loading in my zgenom config. I'll take a look at it this weekend unless you open a PR first :-)