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

Third party completions not working #158

Closed
JounQin opened this issue Aug 6, 2019 · 13 comments
Closed

Third party completions not working #158

JounQin opened this issue Aug 6, 2019 · 13 comments

Comments

@JounQin
Copy link

@JounQin JounQin commented Aug 6, 2019

Describe the bug

Can not make https://github.com/g-plane/zsh-yarn-autocompletions working.

To Reproduce
Steps to reproduce the behavior.

zplugin ice as"completion" pick"*.plugin.zsh" g-plane/zsh-yarn-autocompletions

Expected behavior
zpl clist no g-plane/zsh-yarn-autocompletions

Versions:

  • $ZSH_VERSION == zsh 5.7.1 (x86_64-apple-darwin18.2.0)
  • Operating system name and version (uname -a): Darwin Kernel Version 19.0.0: Tue Jul 23 01:19:36 PDT 2019; root:xnu-6153.0.103.151.1~4/RELEASE_X86_64

Additional context

@psprint

This comment has been minimized.

Copy link
Collaborator

@psprint psprint commented Aug 7, 2019

The plugin doesn't contain any files starting with an underscore. The completions that are being provided are defined within the plugin.zsh file as inline functions. Therefore the completions cannot be managed via Zplugin's completion management subsystem.

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Aug 8, 2019

Is that possible to support it just like zplug? I moved from zplug a few days ago.

@psprint

This comment has been minimized.

Copy link
Collaborator

@psprint psprint commented Aug 11, 2019

Yes. Load it not as a completion but as a regular plugin, and include zpcdreplay:

zplugin ice atload"zpcdreplay"
zplugin light g-plane/zsh-yarn-autocompletions
@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Aug 13, 2019

Sorry, it seems not working to me.

@psprint

This comment has been minimized.

Copy link
Collaborator

@psprint psprint commented Aug 13, 2019

It seems to be working for me:

https://asciinema.org/a/VFlg77imHVK0jeTD7bbPqhzJN

Could you record a similar video and paste it here?

@JounQin

This comment has been minimized.

@psprint

This comment has been minimized.

Copy link
Collaborator

@psprint psprint commented Aug 18, 2019

@psprint

This comment has been minimized.

Copy link
Collaborator

@psprint psprint commented Aug 31, 2019

How is the situation looking? It seems that the completion is being loaded and is triggered on TAB, however something with its setup is wrong and it reports errors?

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Sep 2, 2019

Sorry I didn't focus on it previous days, I'll try zplug tonight to see whether is it an issue of the plugin itself.

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Sep 2, 2019

https://asciinema.org/a/CBcJEwNVO6dUNAJND5jnd7v4S
@psprint It seems it works well with zplug.

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Sep 2, 2019

You can check the following error detail after executing

zplugin ice atload"zpcdreplay"                                                                         
zplugin light g-plane/zsh-yarn-autocompletions
_fetch_yarn_autocompletions_result:1: no such file or directory: /Users/JounQin/.zplugin/plugins/g-plane---zsh-yarn-autocompletions/yarn-autocompletions

📦 v0.0.0 via ⬢ v12.9.1 at ☸️  standard (alauda-system) 
in eslint-mdx on  master ➜ cat /Users/JounQin/.zplugin/plugins/g-plane---zsh-yarn-autocompletions/yarn-autocompletions.git/lfs    21:03:50 •54% 
cat: /Users/JounQin/.zplugin/plugins/g-plane---zsh-yarn-autocompletions/yarn-autocompletions: No such file or directory
📦 v0.0.0 via ⬢ v12.9.1 at ☸️  standard (alauda-system) 
in eslint-mdx on  master ➜ cat /Users/JounQin/.zplugin/plugins/g-plane---zsh-yarn-autocompletions/yarn-autocompletions            21:03:54 •54% cat: /Users/JounQin/.zplugin/plugins/g-plane---zsh-yarn-autocompletions: Is a directory
📦 v0.0.0 via ⬢ v12.9.1 at ☸️  standard (alauda-system) 
in eslint-mdx on  master ➜ /Users/JounQin/.zplugin/plugins/g-plane---zsh-yarn-autocompletions                                     21:04:09 •54% 
⬢ v12.9.1 at ☸️  standard (alauda-system) 
in g-plane---zsh-yarn-autocompletions on  master [?] ➜ ls                                                                         21:04:19 •54% 
Cargo.lock                          azure-pipelines.yml                 src                                 zplug.zsh
Cargo.toml                          install.sh                          yarn-autocompletions.example.yml
LICENSE                             package.json                        yarn-autocompletions.plugin.zsh
README.md                           screenshot.gif                      yarn-autocompletions.plugin.zsh.zwc
@psprint

This comment has been minimized.

Copy link
Collaborator

@psprint psprint commented Sep 8, 2019

Ok, the issue is solved – the command was missing an atclone'' hook that would run the provided zplug.zsh script. Correct command:

zplugin ice atload"zpcdreplay" atclone'./zplug.zsh'          
zplugin light g-plane/zsh-yarn-autocompletions
@psprint psprint closed this Sep 8, 2019
@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Sep 8, 2019

Thanks @psprint! It works to me.

g-plane added a commit to g-plane/zsh-yarn-autocompletions that referenced this issue Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.