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

學無先后,達者為師

網站首頁 編程語言 正文

新版本VS Code 終端設置為git bash

作者:致遠鴨 更新時間: 2022-04-17 編程語言

原教程

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

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

但新版本的vscode配置卻提示錯誤:

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

1.png

點擊“詳細了解如何配置shell”
跳轉至官網文檔:https://code.visualstudio.com/docs/editor/integrated-terminal#_configuring-profiles
大致內容如下:

2.png

新方法

所以對著文檔信息
把修改好的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即自動選擇git bash終端
也可根據自己要求,選擇PowerShell終端
3.png

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

欄目分類
最近更新