2

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?

Balu
  • 398
  • 6
  • 15

2 Answers2

9

Restarting my shell solved it...

Balu
  • 398
  • 6
  • 15
8

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

  • As I have an older version of PowerShell the first command (`pwsh.exe ...`) failed. Instead I opened `cmd.exe` and ran `powershell.exe -noprofile -command "Install-Module PSReadLine -Force -AllowPrerelease -SkipPublisherCheck"` and continued with the rest of the commands in a PowerShell window. – urig Jun 30 '22 at 15:35