【发布时间】:2021-11-02 23:02:39
【问题描述】:
当我今天早上醒来并启动 VSCode 时,我的默认终端在启动时,运行任务时现在是 powershell,而不是 Git Bash。我在窗户上。我尝试更改 settings.json 无济于事。我有什么遗漏吗?
{
"workbench.startupEditor": "newUntitledFile",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"aws.samcli.location": "C:\\Users\\king\\AppData\\Roaming\\npm\\sam.exe",
"typescript.updateImportsOnFileMove.enabled": "always",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"explorer.confirmDragAndDrop": false,
"diffEditor.maxComputationTime": 0,
"extensions.ignoreRecommendations": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.renderControlCharacters": true,
"[jsonc]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
"window.zoomLevel": 0,
"editor.accessibilitySupport": "off",
"workbench.editor.untitled.hint": "hidden",
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe",
"terminal.explorerKind": "external",
"terminal.integrated.automationShell.linux": ""
}
我发现这个 related SO post 是默认的 powershell,但我没有看到任何关于我的设置不正确的地方……尤其是因为我的目标是相反的——停止 Powershell!
【问题讨论】:
-
在stackoverflow.com/a/69048033/836330 上查看我的
Git Bash设置。您正在使用已弃用的设置形式(但我相信它们仍然可以工作)。但是自 v1.60 版本以来出现了另一个问题 - 请参阅链接。 -
@Mark 你的 git bash 配置效果很好,我使用它然后添加了
"terminal.integrated.automationShell.windows": "C:\\Program Files\\Git\\bin\\bash.exe" -
我以为我疯了;很高兴我不是唯一一个。我必须打开我的
settings.json文件,更改一些内容并再次保存,以便它实际设置默认配置文件。太烦人了,我希望他们能尽快解决这个问题。 -
我正要为这个错误发疯,因为我有任务在 powershell 和 Git Bash 中运行。在我的设置中添加 "terminal.integrated.automationShell.windows": "C:\\Program Files \\Git\\bin\\bash.exe" 解决了这个问题。现在我的 powershell 任务和 git bash 任务都运行良好。
-
哦,这破坏了我的“恢复终端”工作流程,我可以确认此错误发生在此更新后
标签: powershell visual-studio-code git-bash