skywind3000 / z.lua

:zap: A new cd command that helps you navigate faster by learning your habits.
MIT License
2.94k stars 137 forks source link

clink's installscript not supported fully correctly #161

Open Destroy666x opened 2 years ago

Destroy666x commented 2 years ago

Hello, if you use clink's new better way to install modules, so: clink installscripts C:\path\to\z.lua\, z.lua works mostly fine, except for one small issue. Every time you launch cmd you see this annoying error at the top:

...cations\Plugins\Windows\System\clink\z.lua\test_path.lua:1: module 'z' not found:
        no field package.preload['z']
        no file 'D:\Backups\Applications\Plugins\Windows\System\clink\clink-completions\modules/z.lua'
        no file 'C:\Program Files (x86)\Lua\5.1\lua\z.luac'
        no file 'C:\Windows\system32\z.dll'
        no file 'C:\Windows\system32\loadall.dll'
        no file '.\z.dll'

Basically what happens is that clink installscripts only accepts dirs not files, so you provide a path which also contains test_path.lua file and that file doesn't work well when it's initialized in clink.

The fix would be to move test_path.lua to a separate directory, e.g. modules or helpers or something, as clink installscripts ignores subdirectories. I'm not sure what the file does though (well, it tests the path, but I don't know under which circumstances, I can't see any references) and why it's in the root of the project.

EDIT: oh, from the commit history I see it's some kind of a test/helper. So moving it shouldn't be any sort of a problem.

skywind3000 commented 2 years ago

fine, do it later.

skywind3000 commented 1 year ago

done, it has been renamed.

Destroy666x commented 1 year ago

Thank you!