vscode配置终端默认为git bash

vscode配置终端默认为git bash

ctrl + shift + p 打开设置

在这里插入图片描述

添加 git bash 并设为默认终端

注意不要配置 git-bash.exe 的路径。
如果配置为 git-bash.exe 路径,则会单独打开 git bash 窗口,而不是嵌入 vscode 终端页签中。

{
    
    
	"terminal.integrated.profiles.windows": {
    
    
        "PowerShell": {
    
    
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
    
    
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
    
    
            // "path": "C:\\Program Files\\Git\\git-bash.exe",
            "path": "C:\\Program Files\\Git\\bin\\bash.exe",
            "args": []
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash"
}

猜你喜欢

转载自blog.csdn.net/qq_43220213/article/details/131428538