1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-17 13:19:48 +00:00

fixed pwd

This commit is contained in:
skywind3000
2019-02-04 01:47:21 +08:00
parent 13c63e87dd
commit 6cfe10c632

3
z.lua
View File

@@ -1235,6 +1235,9 @@ function z_match(patterns, method, subdir)
end
table.sort(M, function (a, b) return a.score > b.score end)
local pwd = (PWD == nil or PWD == '') and os.getenv('PWD') or PWD
if pwd == nil or pwd == '' then
pwd = os.pwd()
end
if pwd ~= '' and pwd ~= nil then
if subdir then
local N = {}