Reputation: 17379
I have two different Windows Terminal profiles for PowerShell Core -- one with a dark color scheme, one with a light color scheme. This generally works well, except in the common case of running dir
. Notice, for example, the colors of the folder names make the names difficult to read in the case of the light-themed window.
I am trying to get the coloring right in both versions.
When I type Get-PSReadLineOption
, I see the following:
As you can see, the colors are generally nice and readable in the dark window, but not as much in the light window.
Set-PSReadLineOption
in my Microsoft.PowerShell_profile.ps1
file. But the problem with that is that the changes are reflected for both my light and dark windows. With this approach, I can set the colors to look good for one theme, but not both themes simultaneously.Question
What do I need to do (and understand) to get the colors right in this scenario? For example, should I tell Windows Terminal to use a different PowerShell profile for different Windows Terminal profile? How do I do that? Or is there some environment variable I can check in the Microsoft.PowerShell_profile.ps1
to determine how to set PSReadLineOptions? Or is there some other approach?
Upvotes: 0
Views: 1471
Reputation: 684
I'm not sure there's a way to have different PsReadline colors for light vs dark theme, but I'd take a look at:
Configuring a light colored theme
That should at least help the light theme be more legible.
Upvotes: 1