This project is inspired by the zsh-syntax-highlighting project.
Requirement: pwsh 5.1+
This package provides syntax highlighting for PowerShell. It enables highlighting of commands whilst they are typed at a PowerShell prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.
demo.mp4
-
Run PowerShell as Administrator.
-
Execute the following command:
Install-Module syntax-highlighting
-
Run the following and restart PowerShell:
echo "Import-Module syntax-highlighting" >> $profile
so you don't have to import the module every time you open PowerShell.
- Commands after a semicolon and second line commands will not be validated
- Only works with Windows and doesn't work on macOS/Linux
- Doesn't validate commands that begin with a "#" well
Rajeswar Khan |