0

I have recently installed PowerShell Core through Chocolatey.

My newly installed PowerShell Core doesn't have syntax highlighting (red circles in the screenshot below) nor does it append the backslash \ when auto-completing directories (blue circles in the screenshot below).

New PowerShell Core vs old PowerShell

How do I enable both this features in the new PowerShell Core?

1 Answer 1

1
  1. Open your PowerShell profile (e.g. ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1)
  2. Append the line Import-Module PSReadLine

If you are using multiple keyboard layouts and have PSReadLine version 2.0.0 installed, due to this bug, you need to install the latest beta with:

Install-Module -Name PSReadLine -RequiredVersion 2.0.0-beta5 -AllowPrerelease

Documentation:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .