Bash 如何将MSYS2 shell集成到Windows上的Visual studio代码中?
我尝试将MSYS2 shell集成到VisualStudio代码集成终端中。以下是我的用户设置:Bash 如何将MSYS2 shell集成到Windows上的Visual studio代码中?,bash,shell,visual-studio-code,msys2,Bash,Shell,Visual Studio Code,Msys2,我尝试将MSYS2 shell集成到VisualStudio代码集成终端中。以下是我的用户设置: { "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe", "terminal.integrated.shellArgs.windows": ["--login", "-i"] } 但是,我遇到了一个问题,--login将当前工作目录更改为Windows home。我希望当前目录位于我工作区的根目
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["--login", "-i"]
}
但是,我遇到了一个问题,--login
将当前工作目录更改为Windows home。我希望当前目录位于我工作区的根目录
我的进一步尝试是尝试添加一个标志-c'cd${workspaceRoot}
。然而,狂欢会在一开始就崩溃了。通过删除--login
,我可以正确地访问当前目录,但如果没有登录模式,所有其他shell命令(ls
,cd
)都不可用
如何将MSYS2 shell正确地集成到vscode中?我成功地实现了这一点
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["-lic", "cd $OLDPWD; exec bash"],
}
原始但不工作100%(接受为答案)
这将正确启动MSYS2 bash shell,以便执行.bash\u登录:
"terminal.integrated.shell.windows": "C:\\msys64\\msys2_shell.cmd",
"terminal.integrated.shellArgs.windows": ["-defterm", "-mingw64", "-no-start", "-here"]
编辑
最初的答案在当时似乎是可行的,但当我试图开始在VSCode中使用任务时,它显然不起作用。尝试运行一个名为make all的任务会导致以下错误:
/usr/bin/bash:/d:没有这样的文件或目录终端进程终止,退出代码为127 从其他答案中,使用
“terminal.integrated.shellArgs.windows”:[“--login”,“-i”]
获得了几乎正确的环境(MSYS而不是MINGW64),但在错误的目录中启动,“terminal.integrated.shellArgs.windows”:[“-lic”,“cd$OLDPWD;exec bash”]
在正确的目录和正确的环境中启动,但无法运行任务
我提出了这个解决方案,目前看来效果不错。在VSCode设置中:
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.env.windows":
{
"MSYSTEM": "MINGW64",
//"MSYS2_PATH_TYPE": "inherit",
"MSVSCODE": "1"
},
在.bashrc中:
对我有用。这对我有用:
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["--login", "-i"],
"terminal.integrated.env.windows":
{
"MSYSTEM": "MINGW64",
"CHERE_INVOKING":"1"
}
}
要禁止从当前目录更改工作目录,请将
CHERE\u INVOKING
环境变量设置为非空值:
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1"
},
在MSYS登录脚本中,设置CHERE_INVOKING
变量仅用于防止shell执行cd“${HOME}”
,而不执行其他操作
如果需要MinGW工具链,请设置MSYSTEM
环境变量以选择工具链。识别的值为MSYS(默认)、MINGW32或MINGW64
"terminal.integrated.env.windows": {
"MSYSTEM": "MINGW64",
},
总之,VS代码设置可能如下所示:
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
"--login",
],
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1",
"MSYSTEM": "MINGW64",
},
}
为了提供一些关于
CHERE_INVOKING
这个非常神秘的命名法的上下文:CHERE
显然是一个函数,虽然MSYS2从Cygwin继承了环境变量,但它实际上并不继承命令本身。调用shell执行任务时,vs code将/d/c
参数添加到shell可执行文件中,就像添加cmd.exe
时一样(请参见cli中的cmd/?
)。当然,MSYS2 bash不会将/d/c
解释为有效的参数,这就是为什么它会回答/d:没有这样的文件或目录,因为它试图将/d
解释为命令。
我刚刚开始深入研究VSCode,我感觉用户配置中缺少了一些配置参数,可以告诉VSCode调用msys2_shell.cmd
(即使用-c
arg)执行任务的好方法(集成/交互式shell没有pb,因为调用bash时没有传递arg)。
无论如何,要解决此问题,可以编辑msys2_shell.cmd
以捕获\d\c
,并使用-c
调用bash:
@echo off
setlocal
rem usefull get what VSCode pass
rem echo "given params %1 %2 %3 %4 %5 %6 %7 %8 %9"
set "WD=%__CD__%"
if NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\"
rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict
rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^<process-id^>
rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
rem or uncomment next line
rem set MSYS2_PATH_TYPE=inherit
:checkparams
rem Help option
if "x%~1" == "x-help" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
if "x%~1" == "x--help" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
if "x%~1" == "x-?" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
if "x%~1" == "x/?" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
rem Shell types
if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams
if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams
if "x%~1" == "x-mingw" shift& (if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams
rem Console types
if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams
if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams
if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams
rem Other parameters
if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-here" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams
if "x%~1" == "x-where" (
if "x%~2" == "x" (
echo Working directory is not specified for -where parameter. 1>&2
exit /b 2
)
cd /d "%~2" || (
echo Cannot set specified working diretory "%~2". 1>&2
exit /b 2
)
set CHERE_INVOKING=enabled_from_arguments
)& shift& shift& goto :checkparams
if "x%~1" == "x-no-start" shift& set MSYS2_NOSTART=yes& goto :checkparams
rem VS CODE CMD.EXE argument PATCH
if "x%~1" == "x/d" (
if "x%~2" == "x/c" (
rem we got a vs code task issued
echo "VSCODE_TASK detected"
shift& shift
set VSCODE_TASK=yes
goto :checkparams
)
)& shift& goto :checkparams
rem Setup proper title
if "%MSYSTEM%" == "MINGW32" (
set "CONTITLE=MinGW x32"
) else if "%MSYSTEM%" == "MINGW64" (
set "CONTITLE=MinGW x64"
) else (
set "CONTITLE=MSYS2 MSYS"
)
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconemu" goto startconemu
if "x%MSYSCON%" == "xdefterm" goto startsh
if NOT EXIST "%WD%mintty.exe" goto startsh
set MSYSCON=mintty.exe
:startmintty
if not defined MSYS2_NOSTART (
start "%CONTITLE%" "%WD%mintty" -i /msys2.ico -t "%CONTITLE%" /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
"%WD%mintty" -i /msys2.ico -t "%CONTITLE%" /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
)
exit /b %ERRORLEVEL%
:startconemu
call :conemudetect || (
echo ConEmu not found. Exiting. 1>&2
exit /b 1
)
if not defined MSYS2_NOSTART (
start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
"%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
)
exit /b %ERRORLEVEL%
:startsh
set MSYSCON=
if not defined MSYS2_NOSTART (
start "%CONTITLE%" "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
rem integrated shell called (interactive)
if not defined VSCODE_TASK (
"%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
rem Call bash with -c arg (execute the command in argument and quit)
rem echo "start %WD%bash" --login -c "%1 %2 %3 %4 %5 %6 %7 %8 %9"
"%WD%bash" --login -c "%1 %2 %3 %4 %5 %6 %7 %8 %9"
)
)
exit /b %ERRORLEVEL%
:EOF
exit /b 0
:conemudetect
set ComEmuCommand=
if defined ConEmuDir (
if exist "%ConEmuDir%\ConEmu64.exe" (
set "ComEmuCommand=%ConEmuDir%\ConEmu64.exe"
set MSYSCON=conemu64.exe
) else if exist "%ConEmuDir%\ConEmu.exe" (
set "ComEmuCommand=%ConEmuDir%\ConEmu.exe"
set MSYSCON=conemu.exe
)
)
if not defined ComEmuCommand (
ConEmu64.exe /Exit 2>nul && (
set ComEmuCommand=ConEmu64.exe
set MSYSCON=conemu64.exe
) || (
ConEmu.exe /Exit 2>nul && (
set ComEmuCommand=ConEmu.exe
set MSYSCON=conemu.exe
)
)
)
if not defined ComEmuCommand (
FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu64.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
set "ComEmuCommand=%%A"
)
if defined ComEmuCommand (
call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ =%%"
set MSYSCON=conemu64.exe
) else (
FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
set "ComEmuCommand=%%A"
)
if defined ComEmuCommand (
call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ =%%"
set MSYSCON=conemu.exe
)
)
)
if not defined ComEmuCommand exit /b 2
exit /b 0
:printhelp
echo Usage:
echo %~1 [options] [bash parameters]
echo.
echo Options:
echo -mingw32 ^| -mingw64 ^| -msys[2] Set shell type
echo -defterm ^| -mintty ^| -conemu Set terminal type
echo -here Use current directory as working
echo directory
echo -where DIRECTORY Use specified DIRECTORY as working
echo directory
echo -[use-]full-path Use full currnent PATH variable
echo instead of triming to minimal
echo -no-start Do not use "start" command and
echo return bash resulting errorcode as
echo this batch file resulting errorcode
echo -help ^| --help ^| -? ^| /? Display this help and exit
echo.
echo Any parameter that cannot be treated as valid option and all
echo following parameters are passed as bash command parameters.
echo.
exit /b 0
@echo关闭
setlocal
rem有效获取VSCode传递的内容
rem回显“给定参数%1%2%3%4%5%6%7%8%9”
设置“WD=%\uuuuuuuuuuuuuuuuuuuuuuuuuuuuux%”
如果不存在“%WD%msys-2.0.dll”,请设置“WD=%~dp0usr\bin”
rem激活windows本机符号链接取消注释下一行
rem set MSYS=winsymlinks:nativestrict
rem设置错误调试程序
rem set MSYS=error_start:%WD%../mingw64/bin/qtcreator.exe^|-debug^|^
rem将完整的当前路径从环境导出到MSYS2使用“-use full PATH”参数
rem或取消注释下一行
rem set MSYS2_路径_类型=继承
:checkparams
rem帮助选项
如果“x%~1”==“x-help”(
调用:printhelp“%~nx0”
退出/b%ERRORLEVEL%
)
如果“x%~1”=“x--help”(
调用:printhelp“%~nx0”
退出/b%ERRORLEVEL%
)
如果“x%~1”==“x-?”(
调用:printhelp“%~nx0”
退出/b%ERRORLEVEL%
)
如果“x%~1”==“x/?”(
调用:printhelp“%~nx0”
退出/b%ERRORLEVEL%
)
rem外壳类型
如果“x%~1”==“x-msys”移位和设置MSSYSTEM=msys和goto:checkparams
如果“x%~1”==“x-msys2”移位和设置MSSYSTEM=MSYS和goto:checkparams
如果“x%~1”==“x-mingw32”移位并设置MSSystem=mingw32&goto:checkparams
如果“x%~1”=“x-mingw64”移位并设置MSSystem=mingw64&goto:checkparams
如果“x%~1”=“x-mingw”shift&(如果存在“%WD%..\..\mingw64”(设置MSYSTEM=mingw64)else(设置MSYSTEM=MINGW32))&转到:检查参数
rem控制台类型
如果“x%~1”==“x-mintty”移位并设置MSYSCON=mintty.exe和goto:checkparams
如果“x%~1”=“x-conemu”移位并设置MSYSCON=conemu并转到:检查参数
如果“x%~1”=“x-defterm”移位并设置MSYSCON=defterm&goto:checkparams
rem其他参数
如果“x%~1”=“x-full-path”shift&set MSYS2\u path\u TYPE=inherit&goto:checkparams
如果“x%~1”=“x-use-full-path”shift&set MSYS2\u path\u TYPE=inherit&goto:checkparams
如果“x%~1”=“x-here”shift&set CHERE\u INVOKING=enabled\u from\u arguments&goto:checkparams
如果“x%~1”==“x-where”(
如果“x%~2”==“x”(
未为-where参数指定echo工作目录。1>&2
出口/b 2
)
cd/d“%~2”|(
echo无法设置指定的工作目录“%~2”。1>&2
出口/b 2
)
设置CHERE_INVOKING=enabled_from_参数
)&shift&shift&goto:检查参数
如果“x%~1”=“x-no-start”移位并设置MSYS2\U NOSTART=是并转到:检查参数
rem VS CODE CMD.EXE参数修补程序
如果“x%~1”=“x/d”(
如果“x%~2”==“x/c”(
rem我们收到了一个vs代码任务
回显“检测到VSCODE_任务”
轮班
设置VSCODE_任务=是
转到:checkparams
)
)&shift&goto:checkparams
rem设置正确的标题
如果“%MSYSTEM%”==“MINGW32”(
设置“CONTITLE=MinGW x32”
)如果“%MSYSTEM%”==“MINGW64”,则为else(
设置“CONTITLE=MinGW x64”
)e
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
"--login",
],
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1",
"MSYSTEM": "MINGW64",
},
}
@echo off
setlocal
rem usefull get what VSCode pass
rem echo "given params %1 %2 %3 %4 %5 %6 %7 %8 %9"
set "WD=%__CD__%"
if NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\"
rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict
rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^<process-id^>
rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
rem or uncomment next line
rem set MSYS2_PATH_TYPE=inherit
:checkparams
rem Help option
if "x%~1" == "x-help" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
if "x%~1" == "x--help" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
if "x%~1" == "x-?" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
if "x%~1" == "x/?" (
call :printhelp "%~nx0"
exit /b %ERRORLEVEL%
)
rem Shell types
if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams
if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams
if "x%~1" == "x-mingw" shift& (if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams
rem Console types
if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams
if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams
if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams
rem Other parameters
if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-here" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams
if "x%~1" == "x-where" (
if "x%~2" == "x" (
echo Working directory is not specified for -where parameter. 1>&2
exit /b 2
)
cd /d "%~2" || (
echo Cannot set specified working diretory "%~2". 1>&2
exit /b 2
)
set CHERE_INVOKING=enabled_from_arguments
)& shift& shift& goto :checkparams
if "x%~1" == "x-no-start" shift& set MSYS2_NOSTART=yes& goto :checkparams
rem VS CODE CMD.EXE argument PATCH
if "x%~1" == "x/d" (
if "x%~2" == "x/c" (
rem we got a vs code task issued
echo "VSCODE_TASK detected"
shift& shift
set VSCODE_TASK=yes
goto :checkparams
)
)& shift& goto :checkparams
rem Setup proper title
if "%MSYSTEM%" == "MINGW32" (
set "CONTITLE=MinGW x32"
) else if "%MSYSTEM%" == "MINGW64" (
set "CONTITLE=MinGW x64"
) else (
set "CONTITLE=MSYS2 MSYS"
)
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconemu" goto startconemu
if "x%MSYSCON%" == "xdefterm" goto startsh
if NOT EXIST "%WD%mintty.exe" goto startsh
set MSYSCON=mintty.exe
:startmintty
if not defined MSYS2_NOSTART (
start "%CONTITLE%" "%WD%mintty" -i /msys2.ico -t "%CONTITLE%" /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
"%WD%mintty" -i /msys2.ico -t "%CONTITLE%" /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
)
exit /b %ERRORLEVEL%
:startconemu
call :conemudetect || (
echo ConEmu not found. Exiting. 1>&2
exit /b 1
)
if not defined MSYS2_NOSTART (
start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
"%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
)
exit /b %ERRORLEVEL%
:startsh
set MSYSCON=
if not defined MSYS2_NOSTART (
start "%CONTITLE%" "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
rem integrated shell called (interactive)
if not defined VSCODE_TASK (
"%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
) else (
rem Call bash with -c arg (execute the command in argument and quit)
rem echo "start %WD%bash" --login -c "%1 %2 %3 %4 %5 %6 %7 %8 %9"
"%WD%bash" --login -c "%1 %2 %3 %4 %5 %6 %7 %8 %9"
)
)
exit /b %ERRORLEVEL%
:EOF
exit /b 0
:conemudetect
set ComEmuCommand=
if defined ConEmuDir (
if exist "%ConEmuDir%\ConEmu64.exe" (
set "ComEmuCommand=%ConEmuDir%\ConEmu64.exe"
set MSYSCON=conemu64.exe
) else if exist "%ConEmuDir%\ConEmu.exe" (
set "ComEmuCommand=%ConEmuDir%\ConEmu.exe"
set MSYSCON=conemu.exe
)
)
if not defined ComEmuCommand (
ConEmu64.exe /Exit 2>nul && (
set ComEmuCommand=ConEmu64.exe
set MSYSCON=conemu64.exe
) || (
ConEmu.exe /Exit 2>nul && (
set ComEmuCommand=ConEmu.exe
set MSYSCON=conemu.exe
)
)
)
if not defined ComEmuCommand (
FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu64.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
set "ComEmuCommand=%%A"
)
if defined ComEmuCommand (
call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ =%%"
set MSYSCON=conemu64.exe
) else (
FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
set "ComEmuCommand=%%A"
)
if defined ComEmuCommand (
call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ =%%"
set MSYSCON=conemu.exe
)
)
)
if not defined ComEmuCommand exit /b 2
exit /b 0
:printhelp
echo Usage:
echo %~1 [options] [bash parameters]
echo.
echo Options:
echo -mingw32 ^| -mingw64 ^| -msys[2] Set shell type
echo -defterm ^| -mintty ^| -conemu Set terminal type
echo -here Use current directory as working
echo directory
echo -where DIRECTORY Use specified DIRECTORY as working
echo directory
echo -[use-]full-path Use full currnent PATH variable
echo instead of triming to minimal
echo -no-start Do not use "start" command and
echo return bash resulting errorcode as
echo this batch file resulting errorcode
echo -help ^| --help ^| -? ^| /? Display this help and exit
echo.
echo Any parameter that cannot be treated as valid option and all
echo following parameters are passed as bash command parameters.
echo.
exit /b 0
"terminal.integrated.shell.windows": "C:\\conemu\\ConEmu\\conemu-msys2-64.exe",
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1",
"MSYSTEM": "MINGW64",
"MSYS2_PATH_TYPE": "inherit",
},
"terminal.integrated.shellArgs.windows": [
"/usr/bin/zsh",
"-l",
"-i",
],
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["--login", "-i"],
"terminal.integrated.env.windows":
{
"MSYSTEM": "MINGW64",
"CHERE_INVOKING":"1",
"PATH" : "/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/"
},
"terminal.integrated.shell.windows": "C:\\msys32\\msys2_shell.cmd",
"terminal.integrated.shellArgs.windows": ["-defterm", "-mingw32", "-no-start", "-here"],
"telemetry.enableTelemetry": true,
"code-runner.saveFileBeforeRun": true,
"code-runner.saveAllFilesBeforeRun": true,
"code-runner.runInTerminal": true,
"liveshare.audio.startCallOnShare": true,
"window.zoomLevel": 1,
"explorer.confirmDelete": false,
"C_Cpp.updateChannel": "Insiders",
"terminal.integrated.shell.windows": "C:\\msys32\\msys2_shell.cmd",
"terminal.integrated.shellArgs.windows": ["-defterm", "-mingw32", "-no-start", "-here"]