Skip to content

Commit

Permalink
fix Monterey initialization issues
Browse files Browse the repository at this point in the history
  • Loading branch information
skywind3000 committed Mar 27, 2022
1 parent e2cce39 commit a8e92e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions z.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- z.lua - a cd command that learns, by skywind 2018-2022
-- Licensed under MIT license.
--
-- Version 1.8.14, Last Modified: 2022/01/30 21:53
-- Version 1.8.15, Last Modified: 2022/03/27 21:38
--
-- * 10x faster than fasd and autojump, 3x faster than z.sh
-- * available for posix shells: bash, zsh, sh, ash, dash, busybox
Expand Down Expand Up @@ -527,13 +527,16 @@ function os.path.abspath(path)
return test
end
end
for _, python in pairs({'python', 'python2', 'python3'}) do
for _, python in pairs({'python3', 'python2', 'python'}) do
local s = 'sys.stdout.write(os.path.abspath(sys.argv[1]))'
local s = '-c "import os, sys;' .. s .. '" \'' .. path .. '\''
local s = python .. ' ' .. s
local test = os.path.which(python)
if test ~= nil and test ~= '' then
return os.call(s)
test = os.call(s)
if test ~= nil and test ~= '' then
return test
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion z.lua.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi

# search lua executable
if [[ -z "$ZLUA_EXEC" ]]; then
for lua in lua luajit lua5.3 lua5.2 lua5.1; do
for lua in lua luajit lua5.4 lua5.3 lua5.2 lua5.1; do
ZLUA_EXEC="$(command -v "$lua")"
[[ -n "$ZLUA_EXEC" ]] && break
done
Expand Down

0 comments on commit a8e92e0

Please sign in to comment.