1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-07-04 03:32:44 +00:00

cd to existent directory if no match found.

This commit is contained in:
skywind3000
2019-01-15 15:57:29 +08:00
parent 7d50ab8fd8
commit 471758a33b
+1 -1
View File
@@ -1118,7 +1118,7 @@ function main(argv)
path = z_cd(args)
end
if path == nil and Z_MATCHMODE ~= 0 then
local last = patterns[#patterns]
local last = args[#args]
if os.path.isdir(last) then
path = os.path.abspath(last)
path = os.path.norm(path)