Just installed VSCode and git bash.
I've added the following lines to the settings.json file:
{
"terminal.integrated.shell.windows": "D:\\Program Files\\Git\\git-bash.exe"
}
When I press Ctr+` to open the integrated shell window, instead of opening inside the main editor at the bottom it opens a new window:
Why isn't it showing in the usual place?
According to this vscoode GitHub Issue (#7286):
...
git-bash.exe
is a Windows application (with WinMain as entry), butbash.exe
is a console application (with main as entry). To be used as integrated shell, the executable must be a console application, so that stdin/stdout/stderr can be redirected.
As of April 2021 (v1.56), the recommended approach is to use:
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Path\\To\\Git\\bin\\bash.exe"
},
// ... additional profiles
}
To set Git Bash
as the default profile, use the following:
"terminal.integrated.defaultProfile.windows": "Git Bash"