File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ From people using z.lua:
3535- Integrated with FZF (optional) for interactive selection and completion.
3636- Quickly go back to a parent directory instead of typing "cd ../../..".
3737- Corresponding experience in different shells and operating systems.
38- - Compatible with Lua 5.1, 5.2 and 5.3+
38+ - Compatible with Lua ( 5.1, 5.2, 5.3+) and luajit.
3939- Self contained, distributed as a single ` z.lua ` script, no other dependence.
4040
4141
Original file line number Diff line number Diff line change 2727if test -e $_ zlua_dir/z.lua
2828 if type -q lua
2929 lua $_ zlua_dir/z.lua --init fish enhanced once echo | source
30+ else if type -q luajit
31+ luajit $_ zlua_dir/z.lua --init fish enhanced once echo | source
3032 else if type -q lua5.3
3133 lua5.3 $_ zlua_dir/z.lua --init fish enhanced once echo | source
3234 else if type -q lua5.2
Original file line number Diff line number Diff line change 22
33ZLUA_SCRIPT=" ${0: A: h} /z.lua"
44
5- [[ -n " $ZLUA_EXEC " ]] && [[ ! -x " $ZLUA_EXEC " ]] && ZLUA_EXEC=" "
5+ if [[ -n " $ZLUA_EXEC " ]] && ! which " $ZLUA_EXEC " & > /dev/null; then
6+ echo " $ZLUA_EXEC not found"
7+ ZLUA_EXEC=" "
8+ fi
69
710# search lua executable
811if [[ -z " $ZLUA_EXEC " ]]; then
9- for lua in lua lua5.3 lua5.2 lua5.1; do
12+ for lua in lua luajit lua5.3 lua5.2 lua5.1; do
1013 ZLUA_EXEC=" $( command -v " $lua " ) "
1114 [[ -n " $ZLUA_EXEC " ]] && break
1215 done
You can’t perform that action at this time.
0 commit comments