flutter_ecommerce_app icon indicating copy to clipboard operation
flutter_ecommerce_app copied to clipboard

Lua interpreter path in `ZLUA_LUAEXE` is not correct

Open bingzhangdai opened this issue 6 years ago • 0 comments

I installed lua in global by using sudo apt install lua5.2. After that, lua locates in /usr/bin/lua. I initialize the script by using eval "$(lua /path/to/z.lua --init bash once enhanced)" as mentioned in readme. The output of lua script is,

ZLUA_SCRIPT="/mnt/c/Users/bingzhang/source/repos/deploy/roles/common/files/bash/.bash/plugins/z.lua"
ZLUA_LUAEXE="/home/david/.local/bin/lua"

_zlua() {
        local arg_mode=""

ZLUA_LUAEXE variable is definitely not correct. However, if I change the initialize command to

eval "$(`which lua` /path/to/z.lua --init bash once enhanced)"

Then, the output seems correct,

ZLUA_SCRIPT="/mnt/c/Users/bingzhang/source/repos/deploy/roles/common/files/bash/.bash/plugins/z.lua"
ZLUA_LUAEXE="/usr/bin/lua"

_zlua() {
        local arg_mode=""

I checked with the lua script, and found that this is caused by the wrong output of os.interpreter(). I have no experience in lua and do not know why this happened.

Is there any problem with the z.lua itself? Or is it a good idea to modify the README.md a little bit in order to get a correct output?

bingzhangdai avatar Feb 16 '20 06:02 bingzhangdai