使用新的 Windows 终端,可以在选项卡式终端中设置任意 shell,并且它配置了很多,包括 Powershell、Cmd 和 WSL(在我的情况下是 Ubuntu 20.04,尽管我认为如果我安装它们会更多)。
但是,我希望能够设置一个 Python“shell”,以加载 Ubuntu WSL 实例,然后自动让它在其中为我运行 Python。目前,我必须启动 Ubuntu,然后从那里手动运行 Python。我的设置是:
{
"guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"hidden": false,
"name": "Ubuntu-20.04",
"startingDirectory": "//wsl$/Ubuntu-20.04/home/pax",
"source": "Windows.Terminal.Wsl"
}
由于我经常将 Python 用于非常快速的“不”脏 REPL 事情,我宁愿能够让它在选项卡中自动启动。有没有办法配置 Windows 终端来做到这一点?对于它的价值,我使用的是 1.2 预览版。