vscode——配置终端集成bash和cmd

前言

配置后bash和cmd是集成的,输入bash回车则进入bash,输入cmd回车则进入cmd

步骤

首先肯定是需要打开我们的vscode咯~

进入终端设置

配置shell路径

根据自己的系统来复制对应的配置文件,并在settings.json编辑

新版本

!> 新版本发生了一些变更, 请注意

"terminal.integrated.shellIntegration.history": 99999,
    "terminal.integrated.shellIntegration.enabled": true,
    "terminal.integrated.defaultProfile.windows": "bash",
    "terminal.integrated.cursorBlinking": true,
    "terminal.integrated.copyOnSelection": true,
    "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"
        },
        "bash": {
            "path":"C:\\Program Files\\Git\\bin\\bash.exe", // 不要忘记修改我
            "args": [],
            "icon": "terminal-bash"
        }
    },

老版本

地址为你的bash.exe文件所在地址

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

效果图

posted @ 2019-06-12 10:45  。思索  阅读(16828)  评论(0编辑  收藏  举报