Powershell: Is there a method to disable the pwsh color setting?

Created on 12 Nov 2019  路  4Comments  路  Source: PowerShell/PowerShell

Summary of the new feature/enhancement

I use xshell and always set the background to white.
When I start pwsh on Linux, the command forecolor is yellow which is very illegible.
How can I disable the color setting of pwsh?

image

Proposed technical implementation details (optional)

Issue-Enhancement Resolution-Answered WG-Interactive-Console

Most helpful comment

Ideally a light background can be detected automatically and colors adjusted automatically. See https://github.com/PowerShell/PSReadLine/issues/464 for more info.

All 4 comments

You could temporary set colors with $host.ui.RawUI

Either that or Set-PSReadLineOption can set the color values used; you can recolor them to something more readable for you or just set any annoying colors back to grey/black.

You can put lines in your $profile script to set these values semi-persistently.

Ideally a light background can be detected automatically and colors adjusted automatically. See https://github.com/PowerShell/PSReadLine/issues/464 for more info.

@vexx32 Thanks.

The Set-PSReadLineOption works.

Was this page helpful?
0 / 5 - 0 ratings