Change color of first input word in PowerShell
I want to change the color of the first console instruction from yellow to a different color because it looks bad on a white background. How can i do this?
+3
Vovan
source
to share
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
Mathias R. Jessen
source
to share