Windows邮件菜单关联windows Terminal,同时在当前目录打开WSL

windows Termial的配置文件中 添加

“defaultProfile”: “{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}”, // 默认打开Wsl的 linux ,而且使用当前目录
{
“guid”: “{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}”,
“hidden”: false,
“name”: “Ubuntu-20.04”,
“startingDirectory” : “.”,
“source”: “Windows.Terminal.Wsl”
}

右键菜单的注册表项:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal]

[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal\command]
@=“cmd /c set CURRENT_PATH=”%V" & start c:\Users\Foundersc\AppData\Local\Microsoft\WindowsApps\wt.exe"

Windows邮件菜单关联windows Terminal,同时在当前目录打开WSL

Windows邮件菜单关联windows Terminal,同时在当前目录打开WSL