VSCode集成终端创建一个单独的窗口 [英] VSCode Integrated Terminal creates a separate window

查看:87
本文介绍了VSCode集成终端创建一个单独的窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只需安装VSCode和git bash.

Just installed VSCode and git bash.

我已将以下几行添加到settings.json文件中:

I've added the following lines to the settings.json file:

{
    "terminal.integrated.shell.windows": "D:\\Program Files\\Git\\git-bash.exe" 
}

当我按Ctr +`打开集成的shell窗口时,而不是在底部的主编辑器中打开它,而是打开一个新窗口:

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?

推荐答案

根据此 vscoode GitHub问题(#7286):

... git-bash.exe 是Windows应用程序(以WinMain作为条目),而 bash.exe 是控制台应用程序(以main作为条目).要用作集成外壳,可执行文件必须是控制台应用程序,以便可以重定向stdin/stdout/stderr.

... 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.

推荐的方法是使用:

"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

这篇关于VSCode集成终端创建一个单独的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆