Closed xuan-w closed 1 year ago
add this:
export ZLUA_LUAEXE=/path/to/your/lua/executable
after eval "$(lua ...)"
something wrong when getting the absolute path of your lua executable, you can try the above work-around, or try to execute lua with its absolute path name, like:
eval "$(/usr/bin/lua ~/path2z.lua/z.lua --init bash once enhanced)"
Thank you! This solved my problem.
I encountered another strange situation today, not sure if it is relevant.
I saw 4 lua processes with high CPU usage even when all terminals were shutdown. In my four years of using your z.lua, I have never seen this. Then I run pkill lua
to kill them all.
Edit: Now I see lua5.4 using a lot of CPU frequently. I guess deleting all history could help. Should I submit another issue and close this issue?
It seems that my z.lua does have some problem.
I removed ~/.zlua, but it never regenerate. Instead, whenever I cd to a directory, there is a new lua5.4 running, they never quit.
Could you let me know how can I debug this? Thank you!
After installing sudo apt-get install lua-filesystem
, high CPU usage problem is solved.
Problem:
Add z.lua to bashrc using
eval "$(lua ~/path2z.lua/z.lua --init bash once enhanced)"
. Bash started normally,z
command is available. However, when I try to callz
command, I got this error:Expected behavior:
No error.
System Information: WSL on Windows 10, Ubuntu 22.04 lua 5.4, installed to /usr/bin/lua.
After I
ln -s /usr/bin/lua /home/username/.local/bin/lua
, I can usez
command. But this shouldn't be the right way to solve this.