[EDITED to add:] It turns out that the actual problem here was a brainless typo I had made. The answer to my actual question is "yes, you just do the obvious thing and it works, if you aren't a moron". I'm accepting the answer that basically says that, but maybe in fact the question should be deleted.
My employer's standard setup for software development on Windows involves using MSYS. (Either traditional MSYS or MSYS2.) Is there a way to run the shell for either of these inside the new Windows Terminal?
Traditional MSYS has a Windows batch script that arranges to execute
sh.exe inside whatever terminal it's being run from. You might therefore think that making a new profile in WT's
"commandline": "path\to\sh.exe", would do the trick. Alas, no: if I do this and ask WT for a terminal of that type, I get a plain old
cmd prompt instead. (Starting in
C:\WINDOWS\System32.) [EDITED to add:] Duh, not-alas, yes: if I do this then it basically does work, but this gets wrong a couple of details that the accepted answer gets right.
The thing you run to get an MSYS2 prompt is a Windows executable instead of a batch script as in traditional MSYS, but it too launches its own
sh.exe. Same thing happens with that.
I guess what's going on here is that the MSYS
sh.exe is just expecting to interact via stdin and stdout, whereas an executable suitable for running directly from WT needs to understand the rather complicated Microsoft console APIs, or something like that.
I've also tried, with little optimism and no success (they all produce the same result as above), the following things:
"commandline": "cmd path/to/sh.exe"
"commandline": "cmd /c path/to/sh.exe"
"commandline": "cmd path/to/msys2_shell.cmd"
"commandline": "cmd /c path/to/msys2_shell.cmd"
Is there any convenient way to get an MSYS shell running inside a Windows Terminal?