add cmder_shell method

This commit is contained in:
Dax T. Games 2018-09-02 17:32:20 -05:00
parent 352a16f84d
commit 823e6fee6e
2 changed files with 26 additions and 5 deletions

10
vendor/init.bat vendored
View File

@ -33,6 +33,7 @@ call "%cmder_root%\vendor\lib\lib_console"
call "%cmder_root%\vendor\lib\lib_git" call "%cmder_root%\vendor\lib\lib_git"
call "%cmder_root%\vendor\lib\lib_profile" call "%cmder_root%\vendor\lib\lib_profile"
:var_loop :var_loop
if "%~1" == "" ( if "%~1" == "" (
goto :start goto :start
@ -85,6 +86,7 @@ call "%cmder_root%\vendor\lib\lib_profile"
goto var_loop goto var_loop
:start :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 - CMDER_ROOT=%CMDER_ROOT%"
%lib_console% debug_output init.bat "Env Var - debug_output=%debug_output%" %lib_console% debug_output init.bat "Env Var - debug_output=%debug_output%"
@ -101,8 +103,7 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" (
set architecture_bits=64 set architecture_bits=64
) )
REM echo %comspec% |find /i "tcc.exe">nul if "%CMDER_SHELL%" neq "tcc.exe" (
REM if %errorlevel% == 1 (
:: Tell the user about the clink config files... :: Tell the user about the clink config files...
if defined "%CMDER_USER_CONFIG%\settings" if not exist "%CMDER_USER_CONFIG%\settings" ( if defined "%CMDER_USER_CONFIG%\settings" if not exist "%CMDER_USER_CONFIG%\settings" (
echo Generating clink initial settings in "%CMDER_USER_CONFIG%\settings" echo Generating clink initial settings in "%CMDER_USER_CONFIG%\settings"
@ -119,7 +120,7 @@ REM if %errorlevel% == 1 (
) else ( ) else (
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor" "%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"
) )
REM ) )
:: Prepare for git-for-windows :: Prepare for git-for-windows
@ -250,8 +251,7 @@ if not defined user_aliases (
) )
echo %comspec% | find /i "tcc.exe">nul if "%CMDER_SHELL%" neq "tcc.exe" (
if "%errorlevel%" == "1" (
REM The aliases environment variable is used by alias.bat to id REM The aliases environment variable is used by alias.bat to id
REM the default file to store new aliases in. REM the default file to store new aliases in.
if not defined aliases ( if not defined aliases (

View File

@ -43,3 +43,24 @@ exit /b
pause pause
exit /b 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