-
Notifications
You must be signed in to change notification settings - Fork 7
Completion for ZSH doesn't work in default path #38
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
Comments
Under ZSH, the completion system needs to be initialized first to use any completion script, not just those generated by complgen. Take a look at https://unix.stackexchange.com/a/477909 |
All other completion scripts in that directory are fully functional. I believe the completion system is initialised well. But the complgen's one is the odd one out. I believe this could be related to the #compldef line. |
I don't think that's the problem. I won't be at a physical keyboard for another week or so but AFAIR there are two forms allowed -- with and without the compdef comment line. That same completion script works fine when installed via homebrew. Check if that completion script works if you Make sure the said directory is listed in the You may also need to If all the above fails, see if the completion works if you manually add the |
It works when sourcing manually with
I have tried this and it didn't change anything.
When
is added to the beginning of that file, it starts working. |
That's strange. Looks like complgen needs a specific end-to-end test for that case. Current ones test generated scripts by sourcing them. I'll get to it when I'm at a physical keyboard again. Thanks for reporting. |
The generated zsh completions scripts should now work both when autoloaded or sourced. I want to implement on more new feature (aot fallbacks) and will then make a new release. Thanks again @meator! |
Ok, thanks! |
I'm interested in adaszko/complgen#38 fix
I'm interested in adaszko/complgen#38 fix
I'm interested in adaszko/complgen#38 fix
I have converted the
usage/complgen.usage
to ZSH completion script and put it into the standard ZSH completions directory,/usr/share/zsh/site-functions/_complgen
. It doesn't work. It doesn't generate any warnings nor errors, but by looking around, I came across this warning:All of the other completions in
/usr/share/zsh/site-functions
begin with#compdef ...
, but not complgen. Are complgen's ZSH completion scripts incompatible with this type of completion script distribution?I should note that I am not familiar with the completion systems of the major shells. I have hoped that this program would spare me from this.
The text was updated successfully, but these errors were encountered: