Set-PSReadLineOption:找不到与参数名称“PredictionViewStyle”匹配的参数

Bal*_*alu 3 terminal powershell psreadline

我正在尝试更改 PSReadline 的 -PredictionViewStyle 选项,但收到错误“Set-PSReadLineOption:找不到与参数名称“PredictionViewStyle”匹配的参数。”

这是全新安装,Set-PSReadLineOption -PredictionSource History 有效。

请问有什么建议吗?

Bal*_*alu 11

重新启动我的外壳解决了它......


小智 8

打开 PowerShell

pwsh.exe -noprofile -command "Install-Module PSReadLine -Force -AllowPrerelease -SkipPublisherCheck"

Install-Module PSReadLine -Force

notepad $profile

Set-PSReadLineOption -PredictionSource History

Set-PSReadLineOption -PredictionViewStyle ListView
Run Code Online (Sandbox Code Playgroud)

保存(cntrl + S)

重启终端