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

add oh-my-zsh/antigen plugin entry

This commit is contained in:
skywind3000
2019-01-29 23:57:50 +08:00
parent 3806828eda
commit c02cea1439

26
omz.plugin.zsh Normal file
View File

@@ -0,0 +1,26 @@
#! /bin/zsh
ZLUA_SCRIPT="${0:A:h}/z.lua"
[[ -n "$ZLUA_EXEC" ]] && [[ ! -x "$ZLUA_EXEC" ]] && ZLUA_EXEC=""
# search lua executable
if [[ -z "$ZLUA_EXEC" ]]; then
if [[ -x "$(which lua)" ]]; then
ZLUA_EXEC="$(which lua)"
elif [[ -x "$(which lua5.3)" ]]; then
ZLUA_EXEC="$(which lua5.3)"
elif [[ -x "$(which lua5.2)" ]]; then
ZLUA_EXEC="$(which lua5.2)"
elif [[ -x "$(which lua5.1)" ]]; then
ZLUA_EXEC="$(which lua5.1)"
else
echo "Not find lua in your $PATH, please install it."
return
fi
fi
eval "$($ZLUA_EXEC $ZLUA_SCRIPT --init zsh once enhanced)"