Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode Integrated Terminal creates a separate window

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:

Git Bash Winow

Why isn't it showing in the usual place?

like image 761
Elliot Avatar asked Nov 24 '17 13:11

Elliot


People also ask

How remove split terminal in VS Code?

Unsplit a split terminal by triggering the Terminal: Unsplit Terminal command through the Command Palette or in the right-click context menu.

How do I create a VS Code window in its own terminal?

Press “Command” or “Ctrl” + “Shift” + “p” to access the “Command Palette.” A search bar will pop-up, enter a search for “View: Toggle Integrated Terminal command,” and select it. This command toggles between displaying the terminal panel in and out of view. In the new terminal window, start entering your Go commands.


1 Answers

According to this vscoode GitHub Issue (#7286):

... git-bash.exe is a Windows application (with WinMain as entry), but bash.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.

The recommended approach is to use:

"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
like image 147
JDB Avatar answered Oct 02 '22 18:10

JDB