4

There's a lot of tutorials about how to using MSYS2 terminal on VSCode. But we know there are 3 shells:

  • MSYS2 MinGW 32-bit
  • MSYS2 MinGW 64-bit
  • MSYS2 MSYS

But if I set "terminal.integrated.shell.windows" to "C:\\msys64\\usr\\bin\\bash.exe", I can only use MSYS2 MSYS. I want to use MSYS2 MinGW 64-bit because I don't want my programs required msys-2.0.dll

Can somebody teach me how to do that?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Verstand
  • 91
  • 2
  • 6

1 Answers1

5

This work for me:

{
     "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" } 
}

Pls. refer to: How do I integrate MSYS2 shell into Visual studio code on Window?

  • 1
    For other readers, the meat of the answer is the "MSYSTEM" environment variable, which tells MSYS2 which environment to use (MSYS2, MINGW32/64, CLANG32/64) – Nahor Aug 11 '22 at 15:48
  • 1
    Also, one should now use terminal profiles rather than hard-coding the shell. See [answer](https://stackoverflow.com/a/68253833) in the question mention above. – Nahor Aug 11 '22 at 15:56