Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change powershell command color

How do I change the command color in powershell? Currently it is yellow and when I use powershell nested in Intellij, I can't read the yellow command on white background.

powershell command color

like image 933
wero026 Avatar asked May 20 '19 08:05

wero026


2 Answers

Regarding @LotPings answer, I solved my issue. The following command in powershell changed the command color from yellow to green:

Set-PSReadLineOption -colors @{ Command = "Green"}
like image 84
wero026 Avatar answered Nov 15 '22 05:11

wero026


You can also set an environment variable in the terminal settings:

IntelliJ terminal settings

Then edit your powershell profile and add something like this:

if ($env:CommandColor) {
    Set-PSReadLineOption -colors @{ Command = $env:CommandColor}
}
like image 44
Stefan Avatar answered Nov 15 '22 04:11

Stefan