Change color of first input word in PowerShell
1 answer
Syntax highlighting comes from PSReadLine
. To set the foreground color for tokens Command
(which is yellow by default) use Set-PSReadLineOption
:
Set-PSReadlineOption -TokenKind Command -ForegroundColor DarkGreen
Put this statement in yours $profile
so that it runs every time PowerShell starts:
'Set-PSReadlineOption -TokenKind Command -ForegroundColor DarkGreen' |Add-Content $Profile
+5
source to share