From 7ffebab4fa13dd0486a88707a2e50a3d48a5b004 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Tue, 15 Jan 2019 17:03:17 +0800 Subject: [PATCH] cd to existent directory if no match find. --- z.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.lua b/z.lua index b59040e..eb44b66 100644 --- a/z.lua +++ b/z.lua @@ -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)