Skip to content

Commit a8e92e0

Browse files
author
skywind3000
committed
fix Monterey initialization issues
1 parent e2cce39 commit a8e92e0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

z.lua

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- z.lua - a cd command that learns, by skywind 2018-2022
55
-- Licensed under MIT license.
66
--
7-
-- Version 1.8.14, Last Modified: 2022/01/30 21:53
7+
-- Version 1.8.15, Last Modified: 2022/03/27 21:38
88
--
99
-- * 10x faster than fasd and autojump, 3x faster than z.sh
1010
-- * available for posix shells: bash, zsh, sh, ash, dash, busybox
@@ -527,13 +527,16 @@ function os.path.abspath(path)
527527
return test
528528
end
529529
end
530-
for _, python in pairs({'python', 'python2', 'python3'}) do
530+
for _, python in pairs({'python3', 'python2', 'python'}) do
531531
local s = 'sys.stdout.write(os.path.abspath(sys.argv[1]))'
532532
local s = '-c "import os, sys;' .. s .. '" \'' .. path .. '\''
533533
local s = python .. ' ' .. s
534534
local test = os.path.which(python)
535535
if test ~= nil and test ~= '' then
536-
return os.call(s)
536+
test = os.call(s)
537+
if test ~= nil and test ~= '' then
538+
return test
539+
end
537540
end
538541
end
539542
end

z.lua.plugin.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
# search lua executable
1111
if [[ -z "$ZLUA_EXEC" ]]; then
12-
for lua in lua luajit lua5.3 lua5.2 lua5.1; do
12+
for lua in lua luajit lua5.4 lua5.3 lua5.2 lua5.1; do
1313
ZLUA_EXEC="$(command -v "$lua")"
1414
[[ -n "$ZLUA_EXEC" ]] && break
1515
done

0 commit comments

Comments
 (0)