From bef20b26ae2b05dc0f92d7e3b9758148db53ef7e Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Mon, 14 Jan 2019 09:42:56 +0800 Subject: [PATCH] new _ZL_MATCH_MODE --- z.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/z.lua b/z.lua index 1a08b9c..32ae44b 100644 --- a/z.lua +++ b/z.lua @@ -1165,6 +1165,7 @@ function z_init() local _zl_cmd = os.getenv('_ZL_CMD') local _zl_matchname = os.getenv('_ZL_MATCH_NAME') local _zl_skippwd = os.getenv('_ZL_SKIP_PWD') + local _zl_matchmode = os.getenv('_ZL_MATCH_MODE') if _zl_data ~= nil and _zl_data ~= "" then if windows then DATA_FILE = _zl_data @@ -1207,11 +1208,18 @@ function z_init() end end if _zl_skippwd ~= nil then - local m = string.lower(_zl_matchname) + local m = string.lower(_zl_skippwd) if (m == '1' or m == 'yes' or m == 'true' or m == 't') then Z_SKIPPWD = true end end + if _zl_matchmode ~= nil then + local m = string.lower(_zl_matchmode) + if (m == '1') then + Z_MATCHNAME = true + Z_SKIPPWD = true + end + end end