日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無(wú)先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

新版本VS Code 終端設(shè)置為git bash

作者:致遠(yuǎn)鴨 更新時(shí)間: 2022-04-17 編程語(yǔ)言

原教程

原教程是在setting.json配置文件中加上這句:

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

但新版本的vscode配置卻提示錯(cuò)誤:

This is deprecated, use #terminal.integrated.defaultProfile.windows# instead

1.png

點(diǎn)擊“詳細(xì)了解如何配置shell”
跳轉(zhuǎn)至官網(wǎng)文檔:https://code.visualstudio.com/docs/editor/integrated-terminal#_configuring-profiles
大致內(nèi)容如下:

2.png

新方法

所以對(duì)著文檔信息
把修改好的git pash目錄,添加到到配置文件 setting.json 中即可

    "terminal.integrated.profiles.windows": {
        "Git-Bash": {
          "path": "D:\\Program Files\\Git\\bin\\bash.exe"
        },
        "PowerShell -NoProfile": {
          "source": "PowerShell",
          "args": ["-NoProfile"]
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git-Bash",

重啟vs code即自動(dòng)選擇git bash終端
也可根據(jù)自己要求,選擇PowerShell終端
3.png

原文鏈接:https://blog.csdn.net/A_zhiyuan/article/details/116930325

欄目分類
最近更新