Skip to content

Instantly share code, notes, and snippets.

@BlueNoob
Forked from Garwih/Windows_Terminal.md
Created December 5, 2020 23:23
Show Gist options
  • Save BlueNoob/47861c64363f0dfec440d79dfcd07731 to your computer and use it in GitHub Desktop.
Save BlueNoob/47861c64363f0dfec440d79dfcd07731 to your computer and use it in GitHub Desktop.
将 Windows Terminal 添加到右键菜单

将 Windows Terminal 添加到右键菜单

将以下代码保存到扩展名为 .reg 的文件中,双击打开

需要按住 shift + 右键打开

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows Terminal Here"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\\Users\\你的用户名\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

不需要 shift,直接右键打开

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows Terminal Here"

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\\Users\\你的用户名\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

当前目录打开时,Terminal 里的路径不是当前目录

检查一下配置文件,看下是否有以下内容,删除之后就可以了。

{
    "profiles": [
        {
            "startingDirectory" : "%USERPROFILE%"
        }
    ]
}

v0.5 之后的版本(如 0.5.2661.0 )需要修改为

"startingDirectory": null

参考:microsoft/terminal#620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment