1

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

mklement0
  • 382,024
  • 64
  • 607
  • 775
FengZi
  • 41
  • 6
  • Look at the prompt on each line. When you are running PS the line starts with PS. You are running Flutter and NPM which are applications and ls will not work in Flutter and NPM – jdweng Aug 02 '23 at 08:49
  • @jdweng I didn't run NPM or Flutter, I was just demonstrating its automatic prompt function. – FengZi Aug 02 '23 at 09:12
  • Prompting in PS stops if you are in an application (NPM, Flutter) or if your PS command is not complete like you do not have match single quotes or brackets. – jdweng Aug 02 '23 at 10:10

1 Answers1

1

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
mklement0
  • 382,024
  • 64
  • 607
  • 775