1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-06-15 18:48:51 +00:00

Merge pull request #54 from aaronjensen/patch-1

Use \which in case user has it aliased to type -a
This commit is contained in:
Linwei
2019-02-24 13:12:20 +08:00
committed by GitHub
+5 -5
View File
@@ -6,14 +6,14 @@ ZLUA_SCRIPT="${0:A:h}/z.lua"
# search lua executable
if [[ -z "$ZLUA_EXEC" ]]; then
if [[ -x "$(which lua)" ]]; then
ZLUA_EXEC="$(which lua)"
if [[ -x "$(\which lua)" ]]; then
ZLUA_EXEC="$(\which lua)"
elif [[ -x "$(which lua5.3)" ]]; then
ZLUA_EXEC="$(which lua5.3)"
ZLUA_EXEC="$(\which lua5.3)"
elif [[ -x "$(which lua5.2)" ]]; then
ZLUA_EXEC="$(which lua5.2)"
ZLUA_EXEC="$(\which lua5.2)"
elif [[ -x "$(which lua5.1)" ]]; then
ZLUA_EXEC="$(which lua5.1)"
ZLUA_EXEC="$(\which lua5.1)"
else
echo "Not find lua in your $PATH, please install it."
return