Skip to content

Commit 472925a

Browse files
author
skywind3000
committed
improve lua test
1 parent 5ba0e50 commit 472925a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

z.lua.plugin.zsh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ ZLUA_SCRIPT="${0:A:h}/z.lua"
66

77
# search lua executable
88
if [[ -z "$ZLUA_EXEC" ]]; then
9-
if [[ -x "$(\which lua)" ]]; then
10-
ZLUA_EXEC="$(\which lua)"
11-
elif [[ -x "$(which lua5.3)" ]]; then
12-
ZLUA_EXEC="$(\which lua5.3)"
13-
elif [[ -x "$(which lua5.2)" ]]; then
14-
ZLUA_EXEC="$(\which lua5.2)"
15-
elif [[ -x "$(which lua5.1)" ]]; then
16-
ZLUA_EXEC="$(\which lua5.1)"
9+
if [[ -x "$(command which lua)" ]]; then
10+
ZLUA_EXEC="$(command which lua)"
11+
elif [[ -x "$(command which lua5.3)" ]]; then
12+
ZLUA_EXEC="$(command which lua5.3)"
13+
elif [[ -x "$(command which lua5.2)" ]]; then
14+
ZLUA_EXEC="$(command which lua5.2)"
15+
elif [[ -x "$(command which lua5.1)" ]]; then
16+
ZLUA_EXEC="$(command which lua5.1)"
1717
else
1818
echo "Not find lua in your $PATH, please install it."
1919
return

0 commit comments

Comments
 (0)