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

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

Open
2 of 3 tasks
arielsalvo opened this issue May 15, 2024 · 3 comments
Open
2 of 3 tasks

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

arielsalvo opened this issue May 15, 2024 · 3 comments
Assignees
Labels
bug 🐞 Inconsistencies or issues which will cause a problem for users or implementors. triage 📑 The issue is awaiting investigation.

Comments

@arielsalvo
Copy link

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

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

No response

@arielsalvo arielsalvo added bug 🐞 Inconsistencies or issues which will cause a problem for users or implementors. triage 📑 The issue is awaiting investigation. labels May 15, 2024
@arielsalvo
Copy link
Author

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 ss-o self-assigned this Jun 23, 2024
@ss-o
Copy link
Member

ss-o commented Jun 23, 2024

Hi @arielsalvo 👋

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
Copy link
Author

Hi @ss-o

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

  • all the links in the directory are broken after pull
  • adding a zi cclear to the atpull ice would get rid of all those broken links
  • they get created again on init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Inconsistencies or issues which will cause a problem for users or implementors. triage 📑 The issue is awaiting investigation.
Projects
None yet
Development

No branches or pull requests

2 participants