zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.89k stars 125 forks source link

Remove all unicode emojis / symbols from file names #58

Closed pschmitt closed 2 years ago

pschmitt commented 2 years ago

Describe the bug Zinit cannot compile annex since some of the handler files have unicode chars in their names which zcompile does not support. I wonder if we can dance around this issue by making the compile ice dynamically rename files.

Zinit config

zinit light-mode compile'*handler' for \
     zdharma-continuum/zinit-annex-bin-gem-node

Error output

(anon):zcompile:2: can't open file: /home/pschmitt/.local/share/zinit/plugins/zdharma-continuum---zinit-annex-bin-gem-node/\M-b\M-^F\M-^Rza-bgn-atclone-handler                                         
(anon):zcompile:2: can't open file: /home/pschmitt/.local/share/zinit/plugins/zdharma-continuum---zinit-annex-bin-gem-node/\M-b\M-^F\M-^Rza-bgn-atdelete-handler                                        
(anon):zcompile:2: can't open file: /home/pschmitt/.local/share/zinit/plugins/zdharma-continuum---zinit-annex-bin-gem-node/\M-b\M-^F\M-^Rza-bgn-atload-handler                                          
(anon):zcompile:2: can't open file: /home/pschmitt/.local/share/zinit/plugins/zdharma-continuum---zinit-annex-bin-gem-node/\M-b\M-^F\M-^Rza-bgn-help-handler
vladdoster commented 2 years ago

I don't think Unicode is the issue here

pschmitt commented 2 years ago

Why? Got a theory on that?

Edit: pretty much looks like a unicode issue to me.

echo hi > test.zsh
zcompile test.zsh
mv test.zsh 🤣.zsh
zcompile 🤣.zsh
zcompile: can't open file: 🤣.zsh
vladdoster commented 2 years ago

Did I think they already had Unicode in their name? Such as zinit-annex-patch-dl?

pschmitt commented 2 years ago

Did I think they already had Unicode in their name? Such as zinit-annex-patch-dl?

Most of them have one or more zsh files that contain a unicode arrow (→) in their name.

The obvious fix is to rename these files in the annex repos. This might be the cleaner way of handling this.

Is there anything preventing us from doing so? 🤔

alichtman commented 2 years ago

I don’t think so. Happy to get rid of the arrow.

On Sun, Nov 14, 2021 at 2:20 PM Philipp Schmitt @.***> wrote:

Did I think they already had Unicode in their name? Such as zinit-annex-patch-dl?

Most of them have one or more zsh files that contain a unicode arrow (→) in their name.

The obvious fix is to rename these files in the annex repos. This might be the cleaner way of handling this.

Is there anything preventing us from doing so? 🤔

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zdharma-continuum/zinit/issues/58#issuecomment-968365594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5FN5OZKKPZNRS6AURVTN3UMARZBANCNFSM5H6N3RUA .

docwhat commented 2 years ago

This is actually a known bug is zsh: https://www.zsh.org/mla/workers/2020/msg01058.html

alichtman commented 2 years ago

Regardless of the root cause, I think the right fix is to remove Unicode arrows from filenames. They cause more trouble than they're worth.

pschmitt commented 2 years ago

:point_up_2: It has begun!

pschmitt commented 2 years ago

And now it's done! 🏆

ryaminal commented 2 years ago

this seems to have horked over a few of my zinit steps. error:

Updating Schniz/fnm…
Binary release already up to date (version: v1.28.1)
[update] Continuing with the update because run-atpull'' ice given.
No files for compilation found.
(eval):1: →za-patch-dl-handler: function definition file not found
(eval):1: →za-submods-atpull-handler: function definition file not found
(eval):1: →za-rust-atclone-handler: function definition file not found
(eval):1: →za-bgn-atclone-handler: function definition file not found

anyone know of a fix that doesn't include wiping my zinit install and starting it over?

pschmitt commented 2 years ago

Are you using the module? Do you still have zwc files laying around in there?

Reinstalling zinit itself won't be needed here in, re-installing the annex might help though.

ryaminal commented 2 years ago

In the end it was much more cumbersome to find all locations and i ended up just wiping zinit entirely.

i also stumbled upon this which explains why the arrow was used. i think it was hasty to remove the arrow entirely without understanding why it was there.