mirror of
https://github.com/cmderdev/cmder.git
synced 2025-02-25 14:50:22 +08:00
Merge pull request #2745 from DRSDavidSoft/patch-3
Minimal comspec detection (related to #2744)
This commit is contained in:
commit
dab1dd93f1
9
vendor/lib/lib_base.cmd
vendored
9
vendor/lib/lib_base.cmd
vendored
@ -61,22 +61,21 @@ 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% | %WINDIR%\System32\find /i "\cmd.exe" > nul && set "CMDER_SHELL=cmd"
|
call :detect_comspec %ComSpec%
|
||||||
echo %comspec% | %WINDIR%\System32\find /i "\tcc.exe" > nul && set "CMDER_SHELL=tcc"
|
exit /b
|
||||||
echo %comspec% | %WINDIR%\System32\find /i "\tccle" > nul && set "CMDER_SHELL=tccle"
|
|
||||||
|
|
||||||
|
:detect_comspec
|
||||||
|
set CMDER_SHELL=%~n1
|
||||||
if not defined CMDER_CLINK (
|
if not defined CMDER_CLINK (
|
||||||
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
|
||||||
if "%CMDER_SHELL%" equ "tccle" set CMDER_CLINK=0
|
if "%CMDER_SHELL%" equ "tccle" set CMDER_CLINK=0
|
||||||
)
|
)
|
||||||
|
|
||||||
if not defined CMDER_ALIASES (
|
if not defined CMDER_ALIASES (
|
||||||
set CMDER_ALIASES=1
|
set CMDER_ALIASES=1
|
||||||
if "%CMDER_SHELL%" equ "tcc" set CMDER_ALIASES=0
|
if "%CMDER_SHELL%" equ "tcc" set CMDER_ALIASES=0
|
||||||
if "%CMDER_SHELL%" equ "tccle" set CMDER_ALIASES=0
|
if "%CMDER_SHELL%" equ "tccle" set CMDER_ALIASES=0
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:update_legacy_aliases
|
:update_legacy_aliases
|
||||||
|
Loading…
x
Reference in New Issue
Block a user