1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-14 03:39:49 +00:00

new _ZL_ECHO variable

This commit is contained in:
skywind3000
2018-12-02 01:26:01 +08:00
parent da9d0a24b0
commit 39c8c67a30
2 changed files with 7 additions and 1 deletions

3
z.cmd
View File

@@ -69,6 +69,9 @@ if /i "%RunMode%"=="-n" (
for /f "delims=" %%i in ('call "%LuaExe%" "%LuaScript%" --cd %MatchType% %StrictSub% %*') do set "NewPath=%%i"
if not "!NewPath!"=="" (
if exist !NewPath!\nul (
if /i not "%_ZL_ECHO%"=="" (
echo !NewPath!
)
pushd !NewPath!
pushd !NewPath!
endlocal

5
z.lua
View File

@@ -1195,8 +1195,8 @@ _zlua() {
else
$_ZL_CD "$dest"
fi
[ -n "$_ZL_ECHO" ] && pwd
fi
[ -n "$_ZL_ECHO" ] && pwd
fi
}
# alias ${_ZL_CMD:-z}='_zlua 2>&1'
@@ -1395,6 +1395,9 @@ if /i "%RunMode%"=="-n" (
for /f "delims=" %%i in ('call "%LuaExe%" "%LuaScript%" --cd %MatchType% %StrictSub% %*') do set "NewPath=%%i"
if not "!NewPath!"=="" (
if exist !NewPath!\nul (
if /i not "%_ZL_ECHO%"=="" (
echo !NewPath!
)
pushd !NewPath!
pushd !NewPath!
endlocal