mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 17:59:11 +08:00
add cmder_shell method
This commit is contained in:
parent
352a16f84d
commit
823e6fee6e
10
vendor/init.bat
vendored
10
vendor/init.bat
vendored
@ -33,6 +33,7 @@ call "%cmder_root%\vendor\lib\lib_console"
|
||||
call "%cmder_root%\vendor\lib\lib_git"
|
||||
call "%cmder_root%\vendor\lib\lib_profile"
|
||||
|
||||
|
||||
:var_loop
|
||||
if "%~1" == "" (
|
||||
goto :start
|
||||
@ -85,6 +86,7 @@ call "%cmder_root%\vendor\lib\lib_profile"
|
||||
goto var_loop
|
||||
|
||||
:start
|
||||
%lib_base% cmder_shell
|
||||
%lib_console% debug_output init.bat "Env Var - CMDER_ROOT=%CMDER_ROOT%"
|
||||
%lib_console% debug_output init.bat "Env Var - debug_output=%debug_output%"
|
||||
|
||||
@ -101,8 +103,7 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||
set architecture_bits=64
|
||||
)
|
||||
|
||||
REM echo %comspec% |find /i "tcc.exe">nul
|
||||
REM if %errorlevel% == 1 (
|
||||
if "%CMDER_SHELL%" neq "tcc.exe" (
|
||||
:: Tell the user about the clink config files...
|
||||
if defined "%CMDER_USER_CONFIG%\settings" if not exist "%CMDER_USER_CONFIG%\settings" (
|
||||
echo Generating clink initial settings in "%CMDER_USER_CONFIG%\settings"
|
||||
@ -119,7 +120,7 @@ REM if %errorlevel% == 1 (
|
||||
) else (
|
||||
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"
|
||||
)
|
||||
REM )
|
||||
)
|
||||
|
||||
:: Prepare for git-for-windows
|
||||
|
||||
@ -250,8 +251,7 @@ if not defined user_aliases (
|
||||
)
|
||||
|
||||
|
||||
echo %comspec% | find /i "tcc.exe">nul
|
||||
if "%errorlevel%" == "1" (
|
||||
if "%CMDER_SHELL%" neq "tcc.exe" (
|
||||
REM The aliases environment variable is used by alias.bat to id
|
||||
REM the default file to store new aliases in.
|
||||
if not defined aliases (
|
||||
|
21
vendor/lib/lib_base.cmd
vendored
21
vendor/lib/lib_base.cmd
vendored
@ -43,3 +43,24 @@ exit /b
|
||||
|
||||
pause
|
||||
exit /b
|
||||
|
||||
:cmder_shell
|
||||
:::===============================================================================
|
||||
:::show_subs - shows all sub routines in a .bat/.cmd file with documentation
|
||||
:::.
|
||||
:::include:
|
||||
:::.
|
||||
::: call "lib_base.cmd"
|
||||
:::.
|
||||
:::usage:
|
||||
:::.
|
||||
::: %lib_base% is_cmd
|
||||
:::.
|
||||
:::options:
|
||||
:::.
|
||||
::: file <in> full path to file containing lib_routines to display
|
||||
:::.
|
||||
:::-------------------------------------------------------------------------------
|
||||
echo %comspec% | find /i "\cmd.exe" > nul && set "CMDER_SHELL=cmd.exe"
|
||||
echo %comspec% | find /i "\tcc.exe" > nul && set "CMDER_SHELL=tcc.exe"
|
||||
exit /b
|
||||
|
Loading…
Reference in New Issue
Block a user