I have been trying to figure this out for a couple hours and it has left me confused.
I have installed MSYS2 on Windows 10, and added it as a profile to windows terminal by adding the following snippet to the profiles section of my settings.json:
{
"commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64",
"guid": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
"icon": "C:/msys64/mingw64.ico",
"name": "MINGW64 / MSYS2",
"startingDirectory": "C:/msys64/home/%USERNAME%"
}
Which works great, however terminal colors don't seem to behave like I would expect.
Here are two images showing vim with the :colo ron option showing the difference between a WSL Ubuntu profile and the MSYS2 profile:
The colors in the WSL profile look like I would expect them to, while the ones in the MSYS2 profile look strange. Both profiles are set to use the same color profile (Campbell) in the Windows Terminal settings. MSYS2 shows the same strange colors when I run it through the included mintty terminal instead of Windows Terminal. If I use MSYS2 to ssh to a different Ubuntu machine, all colors look like I would expect. In all cases (the WSL profile, the MSYS2 profile, and on the remote Ubuntu machine), the $TERM environment variable is set to xterm-256color.
Any ideas what is causing this?