Exploring PSReadline
Early versions of PowerShell were monochrome, although the terminal (conhost.exe) did provide some limited coloring. These versions of Windows PowerShell also lacked some of the cool features found in Linux shells.
With PowerShell 4, PowerShell included a new module, PSReadLine.
The module provides a command-line editing experience that is on a par with the best of the Linux command shells (e.g. BASH). The PSReadLine module provides additional console editing features within both PowerShell 7 and Windows PowerShell.
When you type into a PowerShell console, PSReadLine
intercepts your keystrokes to provide syntax coloring, simple syntax error notification, etc. PSReadLine
enables you to customize your environment to suit your personal preferences. Some key features of the module include:
- Syntax coloring of the command line entries
- Multi-line editing
- History Management
- Customizable key bindings
- Highly customizable
For an overview of PSReadLine, see https://docs.microsoft...