Windows Terminal 调整默认终端为git bash

注意settings.json应该是类似于这样的。"defaultProfile"字段在"globals"上方。原因是[1]

In preparation for v1.0, we have removed some previously deprecated settings. We know this will likely impact your workflows, but we are hoping this is a one-time event.“Globals” namespace
The Terminal no longer supports the globals property in the JSON file. If you have settings inside the globals object, they will be ignored. To fix this, remove the globals object and move your global settings into the root of the JSON file.

调整 defaultProfile 为bash配置对应的 guid.

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile" : "{1c4de342-38b7-51cf-b940-2309a097f589}",
    "globals" : 
    {
        "alwaysShowTabs" : true,
        
        "initialCols" : 120,
        "initialRows" : 30,
        "keybindings" : 
        [
            {
                "command" : "closeTab",
                "keys" : 
                [
                    "ctrl+w"

具体配置文件参考博文Windows Terminal下配置Git Bash中文乱码 - lingr7 - 博客园中的前置操作的部分

参考(两篇合起来看):
Windows Terminal 添加 git-bash - taadis - 博客园
Windows Terminal 调整默认终端 - taadis - 博客园


  1. Windows Terminal gets updated to v0.11 - MSPoweruser ↩︎

原文地址:https://www.cnblogs.com/lingr7/p/12804714.html