Ok, guess I found the secret sauce to make this work. My bad for not paying attention to the details.
The solution is to start the shell with --login -i
paramaters like so:
// works
C:\MinGW\msys\1.0\bin\sh.exe --login -i -cur_console:s1THn -new_console:d:d:\src
// doesn't work
C:\MinGW\msys\1.0\bin\sh.exe -cur_console:s1THn -new_console:d:d:\src
And now all looks good!
--login
stands for login shell, although I have no idea what that means. -i
I guess is for "interactive"? I couldn't find any official docs about these two arguments, so not sure.