z-shell / z-a-meta-plugins

🌀 An annex delivers the capability to install a group of plugins via a single, friendly label
https://wiki.zshell.dev/ecosystem/annexes/meta-plugins
GNU General Public License v3.0
12 stars 8 forks source link

[bug]: Incorrectly linked files for zsh-users/completions #23

Open arielsalvo opened 1 month ago

arielsalvo commented 1 month ago

Environment

OSTYPE=linux-gnu CPUTYPE=x86_64 / MACHINE_TYPE=x86_64 ZSH_VERSION=5.8.1

Expected behavior

Completions to be correctly installed, the files found and no error messages.

Current behavior

Upon starting zsh, sometimes but not always, a whole lot of these show up:

compinit:503: no such file or directory: /home/.../.config/zi/completions/_afew
compinit:503: no such file or directory: /home/.../.config/zi/completions/_android
compinit:shift:505: shift count must be <= $#
compinit:503: no such file or directory: /home/.../.config/zi/completions/_archlinux-java
compinit:shift:505: shift count must be <= $#
compinit:503: no such file or directory: /home/.../.config/zi/completions/_artisan
compinit:shift:505: shift count must be <= $#
...

Running zi clist also shows errors like:

afew, android, archlinux-java           [unknown] [unknown file, clean with cclear]

And running zi cclear will delete all the offending links:

Removing completion: afew [unknown] [unknown file]

Steps to reproduce

I haven't been able to figure out why it doesn't happen all the time, but the links are always broken.

Code snippet

zi load @zsh-users+fast

Aditional information

It seems that the issue is caused by line 122 of the file z-a-meta-plugins.plugin.zsh

zsh-users/zsh-completions           "$_std atpull'zi creinstall -q .' pick'/dev/null'"

In particular, the -q . parameters cause the completions to be linked as ./src/XXXX instead of the full path to the files in the src directory of the plugin. Simply removing it creates functional symlinks and zi clist does not complain any more.

Self-service

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

No response

arielsalvo commented 1 month ago

Noticed this was already discussed in #13 . I can't reproduce it myself now. Maybe adding a zi cclear to the atpull statement to clear any broken links?

ss-o commented 1 week ago

Hi @arielsalvo :wave:

You might want to try skipping zsh-fancy-completions to see if the issue disappears. I suspect there might be a misconfiguration or conflict.

zi ice skip'zsh-fancy-completions'
zi load @zsh-users+fast

Providing the contents of your .zshrc file could help me to reproduce or at least narrow down the issue.

arielsalvo commented 1 week ago

Hi @ss-o

I'm sorry, I dropped this plugin a while ago but, if it helps, what I noticed is: