20240622-PowerShell5和PowerShell7在windows terminal中无法切换

今天安装powertoys小工具commandNotFound的时候,提示要求powershell版本是7,而当前powershell版本是5,如下。

但是powertoys中显示powershell7已经安装,如下图。

主要问题在于powershell5的程序名是 powershell.exe, 而powershell7的程序名是pwsh.exe.
windows terminal每个选项卡默认配置的时候,是需要配置启动的程序名的,也就事说希望powershell7生效,需要把配置中的powershell.exe改成pwsh.exe,如下图。

posted @ 2024-06-22 22:30  fanyfan  阅读(223)  评论(0)    收藏  举报