![Windows 终端添加 git-bash 总是在新终端窗口中打开](https://linux22.com/image/1599780/Windows%20%E7%BB%88%E7%AB%AF%E6%B7%BB%E5%8A%A0%20git-bash%20%E6%80%BB%E6%98%AF%E5%9C%A8%E6%96%B0%E7%BB%88%E7%AB%AF%E7%AA%97%E5%8F%A3%E4%B8%AD%E6%89%93%E5%BC%80.png)
我能够弄清楚如何在 Windows 终端中集成 Git-Bash,但当我选择它时,它总是在 Windows 终端外的新窗口中打开。以下是已删除名称的配置文件。
{
"tabTitle": "Git Bash",
"acrylicOpacity": 0.5,
"background": "#012456",
"closeOnExit": true,
"colorScheme": "Campbell",
"commandline": "\"C:\\Program Files\\Git\\git-bash.exe\" --cd-to-home",
"cursorColor": "#FFFFFF",
"cursorShape": "bar",
"fontFace": "Consolas",
"fontSize": 10,
"guid": "{<some guid>}",
"historySize": 9001,
"icon": "C:\\Users\\<user>\\Pictures\\gitbash.png",
"name": "Git Bash",
"padding": "0, 0, 0, 0",
"snapOnInput": true,
"startingDirectory": "C:\\Users\\<user>",
"useAcrylic": true
},
答案1
我通过改变“命令行”来使用 bash.exe,让它工作起来。例如:
{
...
"commandline": "\"C:\\Program Files\\Git\\bin\\bash.exe\" --cd-to-home"
...
}