我已经设法使用以下设置使集成终端与 msys (bash) 终端一起工作:
"terminal.integrated.shell.windows": "C:\\msys64\\bin\\msys_shell.cmd",
"terminal.integrated.shellargs.windows": "-mingw64 -defterm -nostart",
"terminal.integrated.env.windows": "HOME": "${workspace Folder}"
这很好用。我必须添加 env "HOME" 条目以使 sh 在正确的主目录中启动,因为它无法使用(或根本没有):
“terminal.integrated.cwd”:“${workspaceFolder}”
现在我遇到了另一个问题。虽然上述设置非常适合终端窗口,但它们在构建任务中失败。所以我被迫从集成终端窗口手动“制作”。
它失败并出现错误:
/d: /d: 是一个目录
我的环境是 Windows 10 msys64 mingw64。
任何想法表示赞赏!