1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-21 07:09:49 +00:00

cd to existent directory if no match find.

This commit is contained in:
skywind3000
2019-01-15 17:03:17 +08:00
parent 504d5906cf
commit 7ffebab4fa

2
z.lua
View File

@@ -1116,7 +1116,7 @@ function main(argv)
path = os.path.expand('~')
else
path = z_cd(args)
if path == nil and Z_MATCHMODE ~= 0 then
if path == nil and #args == 1 then
local last = args[#args]
if os.path.isdir(last) then
path = os.path.abspath(last)