PowerShell autocompletes on every keystroke: it's PSReadLine predictive IntelliSense
Somebody on r/powershell described it like this: they built a Win32 Intune package, and right after that their PowerShell window started completing things on every keystroke. clear bought them a few seconds of calm, then it came straight back. Only closing the window and opening a fresh one actually held. I've run into this before. If I remember correctly, the package is almost never the culprit.…
The issue described involves PowerShell autocompleting on every keystroke, specifically due to the PSReadLine module. PSReadLine is the interactive line editor that comes with Windows PowerShell 5.1 and PowerShell 7+, and it's responsible for drawing the line and determining what happens when you press Tab. One of its features, introduced in version 2.2.6, is predictive IntelliSense, which is on by default and draws ghost text ahead of the cursor.
This can make typing feel like it's being done for you, as the line keeps redrawing every time the guess changes, even without a Tab being pressed.
To resolve this issue, you can turn off predictive IntelliSense by setting PredictionSource to None using the command `Set-PSReadLineOption -PredictionSource None`. Alternatively, you can keep predictions but prefer the inline view by setting PredictionSource to History and PredictionViewStyle to InlineView using `Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -PredictionViewStyle InlineView`.
These changes only apply to the current session, and to make them persistent, they need to be added to a profile script. If the issue persists, it may be due to a profile script or another module setting PSReadLine options, which can be checked by starting a new shell without a profile and verifying the PSReadLine version and path.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.