From c769dba4dd2d805117bd8cb731c8584092c14c8a Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Sat, 23 Feb 2019 19:40:26 -0800 Subject: [PATCH] Use \which in case user has it aliased to type -a --- z.lua.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/z.lua.plugin.zsh b/z.lua.plugin.zsh index 6e61fb4..9d885aa 100644 --- a/z.lua.plugin.zsh +++ b/z.lua.plugin.zsh @@ -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