Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run msys2 shell in VSCode terminal

I am working with (a customized install of) msys2, and I would like to make it run in the VSCode integrated terminal. However, it doesen't seem to want to run there. Unlike normal msys, it has msys2_shell.bat & msys2_shell.cmd. It seems to always open up a separate shell window, but I don't want this to always happen, I would like to keep it integrated so I can use shortcuts and such. I already tried the -no-start option. Any suggestions?

Thanks!

like image 872
The Floating Brain Avatar asked Oct 25 '25 07:10

The Floating Brain


1 Answers

msys2_shell.cmd -no-start -defterm could work. Other than that, you can invoke Bash directly if you remember to set MSYSTEM and invoke a login shell: C:\msys64\usr\bin\env MSYSTEM=MSYS /usr/bin/bash -li

For more details, see https://www.msys2.org/wiki/Launchers/.

like image 140
David Macek Avatar answered Oct 27 '25 00:10

David Macek