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

8.6k Views Asked by At

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?

3

There are 3 best solutions below

0
Balu On BEST ANSWER

Restarting my shell solved it...

1
Satyam Kumar On

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

1
emCoder On

In powershell itself, instead of pwsh.exe I ran powershell.exe and then everything else.