'Set-PSReadLineOption: A parameter cannot be found that matches parameter name 'PredictionViewStyle'

I'm trying to change the -PredictionViewStyle option of PSReadline, but I got the error "Set-PSReadLineOption: A parameter cannot be found that matches parameter name 'PredictionViewStyle'."

It's a fresh install and Set-PSReadLineOption -PredictionSource History works.

Any suggestion, please?



Solution 1:[1]

Restarting my shell solved it...

Solution 2:[2]

Open 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

Save (cntrl + S)

Restart Terminal

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Balu
Solution 2 Satyam Kumar