question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Environment

PS version: 5.1.19041.610
PSReadline version: 2.2.0-beta1
os: 10.0.19041.1 (WinBuild.160101.0800)
PS file version: 10.0.19041.1 (WinBuild.160101.0800)
HostName: ConsoleHost
BufferWidth: 190
BufferHeight: 5000

Exception report

Set-PSReadLineOption : A parameter cannot be found that matches parameter name ‘PredictionSource’.

Steps to reproduce

In PowerShell 5.1 with PSReadline 2.2.0-beta1 Attempt to set ‘PredictionSource’ setting

Expected behavior

PredictionSource aka predictive IntelliSense should be available in 2.2.0-beta1 with PowerShell 5.1.

Actual behavior

Error message as described in title. I feel, that I’m missing something obvious, but I can’t get it to work. In PowerShell 7 on the same machine, it does work just fine.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

25reactions
johannmoraescommented, Mar 1, 2022

You need install pre release:

Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck

Restart terminal and try again.

11reactions
eabasecommented, Jan 11, 2022

To install latest Beta release, open Admin CMD:

cd C:\Program Files\PowerShell\7
pwsh.exe -noprofile -command "Install-Module PSReadLine -Force -AllowPrerelease -SkipPublisherCheck"

(Note: Apparently no need to uninstall the older version.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set-PSReadLineOption: A parameter cannot be found that ...
I'm trying to change the -PredictionViewStyle option of PSReadline, but I got the error "Set-PSReadLineOption: A parameter cannot be found that ...
Read more >
How Hard Could Installing Autocomplete For PowerShell Be?
I get the error: Set-PSReadLineOption : A parameter cannot be found that matches parameter name 'PredictionSource'.... 2. Fix ...
Read more >
Set-PSReadLineOption: A parameter cannot be found that ...
Coding example for the question Set-PSReadLineOption: A parameter cannot be found that matches parameter name 'PredictionViewStyle'-powershell.
Read more >
Installing and setting up PowerShell PSReadline with ...
Set -PSReadLineOption : A parameter cannot be found that matches parameter name 'PredictionSource'. This happened even though I validated, ...
Read more >
Set-PSReadLineOption (PSReadLine) - PowerShell
Customizes the behavior of command line editing in PSReadLine. In this article. Syntax; Description; Examples; Parameters; Inputs; Outputs; Related Links ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found