将"在此处启动Windows Terminal"添加到右键菜单

最终效果如下图所示:

 

首先将如下的文件保存,并更改为reg后缀,然后添加到注册表:

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOTDirectoryBackgroundshellwt]
@="Windows Terminal Here"
"Icon"="C:\Users\your_username\Pictures\terminal.ico"

[HKEY_CLASSES_ROOTDirectoryBackgroundshellwtcommand]
@="C:\Users\your_username\AppData\Local\Microsoft\WindowsApps\wt.exe"

其中Icon项指向的是图标文件的位置,如果不需要图标可以删掉这一行。Terminal的图标到github主页搜terminal.ico就可以找到了。

添加到注册表后右键就有这一项了,但是启动的路径还不是当前目录。

我们需要在Windows Terminal配置文件中添加下面内容

"defaults":
    {
        "startingDirectory" : "."
    }, 

这样就完成了。

参考:https://www.zhihu.com/question/325948326/answer/700753639

------------------------------------------------------------------------- 花有重开日,人无再少年
原文地址:https://www.cnblogs.com/lbz007oi/p/12669015.html