From 71bae7fc0bca2643bb9adbb8f37819d9da9cabf2 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Fri, 19 May 2023 10:51:41 +0800 Subject: [PATCH] refine window batch script initializing --- z.cmd | 4 +--- z.lua | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/z.cmd b/z.cmd index 8320456..f821238 100644 --- a/z.cmd +++ b/z.cmd @@ -1,10 +1,8 @@ @echo off setlocal EnableDelayedExpansion -set "HomeDir=%~dp0" -set "PathSave=%PATH%" set "LuaExe=lua" -set "LuaScript=%HomeDir%z.lua" +set "LuaScript=%~dp0z.lua" set "MatchType=-n" set "StrictSub=-n" set "RunMode=-n" diff --git a/z.lua b/z.lua index 7f75426..00b6073 100755 --- a/z.lua +++ b/z.lua @@ -2721,8 +2721,6 @@ function z_windows_init(opts) else print('@echo off') print('setlocal EnableDelayedExpansion') - print('set "HomeDir=%~dp0"') -- So that Lua can find the z.lua file. - print('set "PathSave=%PATH%"') print('set "LuaExe=' .. os.interpreter() .. '"') print('set "LuaScript=' .. os.scriptname() .. '"') print(script_init_cmd)