美文网首页
windows terminal here配置到右键菜单

windows terminal here配置到右键菜单

作者: mudssky | 来源:发表于2020-10-27 10:49 被阅读0次

01.使用记事本创建一个reg后缀的文件,添加下面的内容,

把路径中的username改为自己电脑的用户目录名

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\\Users\\username\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"


[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Windows terminal here(Admin)"
"ShowBasedOnVelocityId"=dword:00639bc8

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="C:\\Users\\username\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

双击执行 reg文件

02.编辑settings.json文件

打开windows terminal,

执行 ctrl+,,或者在标签栏的下拉菜单里面找到设置文件

在对应的命令行配置中添加"startingDirectory": "."

如下:

 "list":
        [
            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false,
                "startingDirectory": "."
            },

相关文章

网友评论

      本文标题:windows terminal here配置到右键菜单

      本文链接:https://www.haomeiwen.com/subject/ysgtvktx.html