上一级页面:index-la
使用脚本
推荐使用这种方法
lextm/windowsterminal-shell: Install/uninstall scripts for Windows Terminal context menu items (github.com)
手动修改注册表
使用脚本的话,跳过这步
不使用脚本的话,也可以选择使用记事本创建一个reg后缀的文件,添加下面的内容,
把路径中的username改为自己电脑的用户目录名(使用绝对路径,不要使用环境变量)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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:00639b c8[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command ] @="C:\\Users\\username\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"
双击执行 reg文件
编辑settings.json文件
打开windows terminal,
执行 ctrl+,
,或者在标签栏的下拉菜单里面找到设置文件
在对应的命令行配置中添加"startingDirectory": "."
如下:
1 2 3 4 5 6 7 8 9 10 "list" : [ { "guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}" , "name" : "Windows PowerShell" , "commandline" : "powershell.exe" , "hidden" : false , "startingDirectory" : "." } ,
另外一个脚本
将 Windows Terminal 添加到右键菜单 (github.com)
参考、引用、致谢
windows terminal here配置到右键菜单 - 简书 (jianshu.com)