2019-06-25 16:37:57 +08:00
|
|
|
@echo off
|
2020-07-05 01:43:18 +08:00
|
|
|
|
|
|
|
:: Find root dir
|
|
|
|
|
|
|
|
if not defined CMDER_ROOT (
|
|
|
|
for /f "delims=" %%i in ("%~dp0\..\..") do (
|
|
|
|
set "cmder_root=%%~fi"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
if defined cmder_user_bin (
|
2020-07-06 03:22:09 +08:00
|
|
|
set CMDER_VSCODE_INIT_ARGS=%cmder_user_bin%\vscode_init_args.cmd
|
|
|
|
) else (
|
2020-07-05 01:43:18 +08:00
|
|
|
set CMDER_VSCODE_INIT_ARGS=%CMDER_ROOT%\bin\vscode_init_args.cmd
|
|
|
|
)
|
|
|
|
|
2020-07-05 02:23:16 +08:00
|
|
|
if not exist "%CMDER_VSCODE_INIT_ARGS%" (
|
|
|
|
echo Creating initial "%CMDER_VSCODE_INIT_ARGS%"...
|
|
|
|
copy "%CMDER_ROOT%\vendor\bin\vscode_init_args.cmd.default" "%CMDER_VSCODE_INIT_ARGS%"
|
2020-07-06 03:22:09 +08:00
|
|
|
) else (
|
2020-07-05 01:43:18 +08:00
|
|
|
call "%CMDER_VSCODE_INIT_ARGS%"
|
|
|
|
)
|
|
|
|
|
2019-06-25 16:37:57 +08:00
|
|
|
IF [%1] == [] (
|
|
|
|
REM -- manually opened console (Ctrl + Shift + `) --
|
2019-06-27 19:00:55 +08:00
|
|
|
CALL "%~dp0..\init.bat"
|
2019-06-25 16:37:57 +08:00
|
|
|
) ELSE (
|
|
|
|
REM -- task --
|
|
|
|
CALL cmd %*
|
|
|
|
exit
|
|
|
|
)
|