How to turn on the automatic prompt function of PowerShell?

78 Views Asked by At

I don't know what happened when I was using PowerShell.My PowerShell suddenly had an automatic completion function, but I don't know how I opened it.

I suspect this is running a certain command or using a shortcut key. But before running this feature, I only used ls and dir.

My version of PowerShell is 7.3.5.

enter image description here

1

There are 1 best solutions below

0
On

What you're seeing is the Predictive IntelliSense feature introduced in v2.1 of the PSReadLine module, which ships with recent versions of PowerShell (Core) 7+ (but you're always free to install the latest version via Install-Module PSReadLine -Scope CurrentUser, for instance).

To disable this feature, place the following Set-PSReadLineOption in your $PROFILE file:

Set-PSReadLineOption -PredictionSource None