Search code examples
windowspowershellterminalautocompleteintellisense

Windows Terminal/Powershell Intellisense


I'm not sure if these are the correct terms, but in some tutorial videos I've watched, I've seen terminal "auto-completing" some commands in some sort of intellisense. For example, one starts typing "npx cre", the terminal auto-completes with "npx create-react-app", but the remaining characters a bit greyed out, to accept or not the auto-completion. Is this feature exclusive to macOS or Linux terminals? I'm currently using the new windows terminal app, but I couldn't find a way to enable this.

Thanks so much if you someone can clarify this.


Solution

  • It's the 2.1 version of Psreadline: PSReadLine 2.1.0 - PowerShell Gallery It autocompletes using the command history file. It works in powershell 5.1 and comes with powershell 7.

    Actually PSReadLine is up to version 2.2.6. To turn it on, put "Set-PSReadLineOption -PredictionSource History" in your $profile.

    Install-Module -Name PSReadLine -force
    

    Predictive IntelliSense · Issue #1468 · PowerShell/PSReadLine

    Make sure that you use the right arrow to "activate" the auto completion suggestion. Using the Tab displays another behavior.