1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-12 18:59:50 +00:00

zsh plugin: fix ZLUA_EXEC check

Previous check required full path (even if value was available in PATH)
This commit is contained in:
Jakub Łuczyński
2021-11-13 10:33:41 +01:00
parent 336e95b05a
commit c88746629b

View File

@@ -2,7 +2,10 @@
ZLUA_SCRIPT="${0:A:h}/z.lua"
[[ -n "$ZLUA_EXEC" ]] && [[ ! -x "$ZLUA_EXEC" ]] && ZLUA_EXEC=""
if [[ -n "$ZLUA_EXEC" ]] && ! which "$ZLUA_EXEC" &>/dev/null; then
echo "$ZLUA_EXEC not found"
ZLUA_EXEC=""
fi
# search lua executable
if [[ -z "$ZLUA_EXEC" ]]; then