Skip to content

Commit 71bae7f

Browse files
author
skywind3000
committed
refine window batch script initializing
1 parent 4d89b55 commit 71bae7f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

z.cmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
@echo off
22
setlocal EnableDelayedExpansion
33

4-
set "HomeDir=%~dp0"
5-
set "PathSave=%PATH%"
64
set "LuaExe=lua"
7-
set "LuaScript=%HomeDir%z.lua"
5+
set "LuaScript=%~dp0z.lua"
86
set "MatchType=-n"
97
set "StrictSub=-n"
108
set "RunMode=-n"

z.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,8 +2721,6 @@ function z_windows_init(opts)
27212721
else
27222722
print('@echo off')
27232723
print('setlocal EnableDelayedExpansion')
2724-
print('set "HomeDir=%~dp0"') -- So that Lua can find the z.lua file.
2725-
print('set "PathSave=%PATH%"')
27262724
print('set "LuaExe=' .. os.interpreter() .. '"')
27272725
print('set "LuaScript=' .. os.scriptname() .. '"')
27282726
print(script_init_cmd)

0 commit comments

Comments
 (0)