Windows Terminal 配置记录
帮助文档:
https://docs.microsoft.com/en-us/windows/terminal/
设置右键菜单:
win11 terminal正式版已全面支持右键菜单。(update 2021-3-20)
win10 仅支持目录的右键菜单。导入注册表:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Terminal Here]
[HKEY_CLASSES_ROOT\Directory\Background\shell\Terminal Here\command]
@="C:\\Users\\<用户名>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -d ."
Terminal配置文件,添加git bash
{
...
"profiles":
{
"list":
[
...
{
"guid": "{52d45a95-f1c7-4d89-8b0f-d7037783775f}",
"commandline" : "C:\\Program Files\\Git\\bin\\bash.exe --login -i",
"icon" : "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
"name" : "Git Bash",
"startingDirectory" : "~",
"closeOnExit": "always"
},
...
]
},
...
}
注意:
git bash 需ctrl+d或exit推出,直接点 X 关闭标签,无法正常保存命令记录。
参考:
https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal
wsl起始目录:
"startingDirectory" : "//wsl$/Debian/root/"
Powerline配置:
https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup
禁止Azure控制台自动生成
"disabledProfileSources": ["Windows.Terminal.Azure"],
按住alt点“设置”可打开default.json
自带的右键菜单:
https://www.cnblogs.com/TianFang/p/13843696.html
https://github.com/microsoft/terminal/pull/6100
本文采用 知识共享署名 4.0 国际许可协议 进行许可