How can I change the color of string values I type?
PowerShell 5.0 ships with PSReadLine, a module that enhances the editing experience in the console by adding syntax highlight coloring among other things.
You can change the color of string tokens with Set-PSReadLineOption
, for example:
Set-PSReadlineOption -TokenKind String -ForegroundColor Cyan
For PSReadLine version 2.0 and up, use the -Colors
parameter and supply a dictionary of (optional) token color overrides to Set-PSReadLineOption
:
Set-PSReadLineOption -Colors @{ String = 'Cyan' }