Merge branch 'master' of https://github.com/cmderdev/cmder into multi-user

This commit is contained in:
Dax T. Games 2018-11-22 16:21:24 -06:00
commit eb6a332da2
5 changed files with 12 additions and 12 deletions

View File

@ -40,7 +40,7 @@ goto parseargument
) else if "%currentarg%" neq "" ( ) else if "%currentarg%" neq "" (
if "%~2" equ "" ( if "%~2" equ "" (
:: Show the specified alias :: Show the specified alias
doskey /macros | findstr /b %currentarg%= && exit /b doskey /macros | %WINDIR%\System32\findstr /b %currentarg%= && exit /b
echo insufficient parameters. echo insufficient parameters.
goto :p_help goto :p_help
) else ( ) else (
@ -85,7 +85,7 @@ if not ["%_temp%"] == ["%alias_name%"] (
) )
:: replace already defined alias :: replace already defined alias
findstr /b /v /i "%alias_name%=" "%ALIASES%" >> "%ALIASES%.tmp" %WINDIR%\System32\findstr /b /v /i "%alias_name%=" "%ALIASES%" >> "%ALIASES%.tmp"
echo %alias_name%=%alias_value% >> "%ALIASES%.tmp" && type "%ALIASES%.tmp" > "%ALIASES%" & @del /f /q "%ALIASES%.tmp" echo %alias_name%=%alias_value% >> "%ALIASES%.tmp" && type "%ALIASES%.tmp" > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
doskey /macrofile="%ALIASES%" doskey /macrofile="%ALIASES%"
endlocal endlocal
@ -93,7 +93,7 @@ exit /b
:p_del :p_del
set del_alias=%~1 set del_alias=%~1
findstr /b /v /i "%del_alias%=" "%ALIASES%" >> "%ALIASES%.tmp" %WINDIR%\System32\findstr /b /v /i "%del_alias%=" "%ALIASES%" >> "%ALIASES%.tmp"
type "%ALIASES%".tmp > "%ALIASES%" & @del /f /q "%ALIASES%.tmp" type "%ALIASES%".tmp > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
doskey %del_alias%= doskey %del_alias%=
doskey /macrofile="%ALIASES%" doskey /macrofile="%ALIASES%"
@ -105,7 +105,7 @@ echo Aliases reloaded
exit /b exit /b
:p_show :p_show
doskey /macros|findstr /v /r "^;=" | sort doskey /macros|%WINDIR%\System32\findstr /v /r "^;=" | sort
exit /b exit /b
:p_help :p_help

View File

@ -52,7 +52,7 @@ set "feFlagName=%feFlagName% "
:: echo %feCommand% :: echo %feCommand%
:: echo %feParam% :: echo %feParam%
:: echo. :: echo.
echo %CMDER_USER_FLAGS% | find /i "%feFlagName%">nul echo %CMDER_USER_FLAGS% | %WINDIR%\System32\find /i "%feFlagName%">nul
if "%ERRORLEVEL%" == "0" ( if "%ERRORLEVEL%" == "0" (
if "%feNOT%" == "false" ( if "%feNOT%" == "false" (
endlocal && call %feCommand% %feParam% endlocal && call %feCommand% %feParam%

2
vendor/init.bat vendored
View File

@ -300,7 +300,7 @@ if "%CMDER_ALIASES%" == "1" (
echo Creating initial user_aliases store in "%user_aliases%"... echo Creating initial user_aliases store in "%user_aliases%"...
copy "%CMDER_ROOT%\vendor\user_aliases.cmd.example" "%user_aliases%" copy "%CMDER_ROOT%\vendor\user_aliases.cmd.example" "%user_aliases%"
) else ( ) else (
type "%user_aliases%" | findstr /i ";= Add aliases below here" >nul type "%user_aliases%" | %WINDIR%\System32\findstr /i ";= Add aliases below here" >nul
if "!errorlevel!" == "1" ( if "!errorlevel!" == "1" (
echo Creating initial user_aliases store in "%user_aliases%"... echo Creating initial user_aliases store in "%user_aliases%"...
if defined CMDER_USER_CONFIG ( if defined CMDER_USER_CONFIG (

View File

@ -27,7 +27,7 @@ exit /b
::: file <in> full path to file containing lib_routines to display ::: file <in> full path to file containing lib_routines to display
:::. :::.
:::------------------------------------------------------------------------------- :::-------------------------------------------------------------------------------
for /f "tokens=* delims=:" %%a in ('type "%~1" ^| findstr /i /r "^:::"') do ( for /f "tokens=* delims=:" %%a in ('type "%~1" ^| %WINDIR%\System32\findstr /i /r "^:::"') do (
rem echo a="%%a" rem echo a="%%a"
if "%%a"=="." ( if "%%a"=="." (
@ -61,9 +61,9 @@ exit /b
::: file <in> full path to file containing lib_routines to display ::: file <in> full path to file containing lib_routines to display
:::. :::.
:::------------------------------------------------------------------------------- :::-------------------------------------------------------------------------------
echo %comspec% | find /i "\cmd.exe" > nul && set "CMDER_SHELL=cmd" echo %comspec% | %WINDIR%\System32\find /i "\cmd.exe" > nul && set "CMDER_SHELL=cmd"
echo %comspec% | find /i "\tcc.exe" > nul && set "CMDER_SHELL=tcc" echo %comspec% | %WINDIR%\System32\find /i "\tcc.exe" > nul && set "CMDER_SHELL=tcc"
echo %comspec% | find /i "\tccle" > nul && set "CMDER_SHELL=tccle" echo %comspec% | %WINDIR%\System32\find /i "\tccle" > nul && set "CMDER_SHELL=tccle"
set CMDER_CLINK=1 set CMDER_CLINK=1
if "%CMDER_SHELL%" equ "tcc" set CMDER_CLINK=0 if "%CMDER_SHELL%" equ "tcc" set CMDER_CLINK=0

View File

@ -68,14 +68,14 @@ exit /b
if "%CMDER_CONFIGURED%" == "1" ( if "%CMDER_CONFIGURED%" == "1" (
%lib_console% debug_output :enhance_path "Env Var - find_query=%find_query%" %lib_console% debug_output :enhance_path "Env Var - find_query=%find_query%"
echo "%path%"|findstr >nul /I /R ";%find_query%\"$" echo "%path%"|%WINDIR%\System32\findstr >nul /I /R ";%find_query%\"$"
if "!ERRORLEVEL!" == "0" set found=1 if "!ERRORLEVEL!" == "0" set found=1
) )
%lib_console% debug_output :enhance_path "Env Var 1 - found=!found!" %lib_console% debug_output :enhance_path "Env Var 1 - found=!found!"
if "!found!" == "0" ( if "!found!" == "0" (
if "%CMDER_CONFIGURED%" == "1" ( if "%CMDER_CONFIGURED%" == "1" (
echo "%path%"|findstr >nul /i /r ";%find_query%;" echo "%path%"|%WINDIR%\System32\findstr >nul /i /r ";%find_query%;"
if "!ERRORLEVEL!" == "0" set found=1 if "!ERRORLEVEL!" == "0" set found=1
) )
%lib_console% debug_output :enhance_path "Env Var 2 - found=!found!" %lib_console% debug_output :enhance_path "Env Var 2 - found=!found!"