mirror of
https://github.com/skywind3000/z.lua
synced 2026-03-18 21:59:49 +00:00
recognize %_ZL_CD% in cmd.exe
This commit is contained in:
8
z.cmd
8
z.cmd
@@ -120,8 +120,12 @@ rem -- Exploits variable expansion and the pushd stack to set the current
|
||||
rem -- directory without leaking a pushd.
|
||||
popd
|
||||
setlocal
|
||||
set NewPath=%CD%
|
||||
endlocal & popd & cd /d "%NewPath%"
|
||||
set "NewPath=%CD%"
|
||||
set "CDCmd=cd /d"
|
||||
if /i not "%_ZL_CD%"=="" (
|
||||
set "CDCmd=%_ZL_CD%"
|
||||
)
|
||||
endlocal & popd & %CDCmd% "%NewPath%"
|
||||
|
||||
:end
|
||||
echo.
|
||||
|
||||
Reference in New Issue
Block a user