-
Notifications
You must be signed in to change notification settings - Fork 282
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
Completions Provided by Plugins Not Working #698
Comments
I found the same, the Line 59 in 8846aa9
Related issue: ohmyzsh/ohmyzsh#9139. |
I'm having issue with the gcloud plugin completion not working I've added a
Then at the prompt, doing a $ complete -p
complete _bash bash
$ When sourcing the completion script at the prompt and issuing $ source google-cloud-sdk/completion.zsh.inc
$ complete -p
complete -o default -F _bq_completer bq
complete -o nospace -F _python_argcomplete gsutil
complete -o nospace -o default -F _python_argcomplete gcloud
complete _bash bash
$ And completion is working from then on. Somehow, the Any idea ? Greetings, |
I have this issue to, and so do many others. I think it keeps coming up because it's so hard to narrow down what the issue is. Also, this user might have found something releveant:
That is related to what @mcornella mentioned above #698 (comment), which seems to be the heart of the matter. |
It seems this is the reason: "Defer bundle loading to Commenting out these two lines in antigen makes the oh-my-zsh completions work again:
|
Description
compdef
in plugin scripts have no effect.Steps to reproduce
Minimal
.zshrc
:The
zsh-at
plugin provides an@
command, which provided its own completion function, but when I hittab
after the@
command, I got default filename completions.Expected behavior:
Software version
antigen version
: v2.2.2 (8846aa9)zsh --version
: zsh 5.7.1 (x86_64-redhat-linux-gnu)More information
By inspecting the cached script
init.zsh
, I found that:compinit
function was called in_antigen_compinit
, which was called by aprecmd
hook;precmd
hook got triggered only after the init script was sourced, and before the first command prompt;compdef
function defined in the init script, with the zsh completion system uninitialized.I found the code regarding completions quite confusing. Why not call _antigen_compinit directly instead of using a hook? Why is there an empty
compdef
function?The text was updated successfully, but these errors were encountered: