question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PSReadLine Colors not setting for "Error" (always black text)

See original GitHub issue

VERSION

PowerShell 7.1rc2 (same in version 7.0x)

STEPS to reproduce

Set-PSReadLineOption -Colors @{ "Error" = "Red" }

Set-PSReadLineOption -Colors @{ "Error" = "#AABBCC" }

Set-PSReadLineOption -Colors @{ "Error" = [System.ConsoleColor]::Red }

not changing the color, always leave it black…

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
daxian-dbwcommented, Oct 30, 2020

always leave it black…

@IBIT-ZEE Can you please clarify what is left black?

Note that the ErrorColor is for rendering errors that happen in PSReadLine, not the color setting for the ErrorRecord thrown by a PowerShell command execution. For example, the ErrorPrompt feature in PSReadLine uses this color setting:

image image

It’s also used when there is a problem saving commands to the history file.

0reactions
msftbot[bot]commented, Nov 9, 2020

This issue is closed because it has been marked as requiring author feedback but has not had any activity for 14 days. If you think the issue is still relevant, please reopen and provide your feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does PowerShell 7 revert to black on white after ...
I found that Set-PSReadLineOption will set your text color to default if you set an invalid ansi escape sequence. There is different behavior ......
Read more >
Color Your World with PSReadLine - Part 3
These have nothing to do with changing the colors of your error messages, most likely red on black. These values can be set...
Read more >
PowerTip: Change Color of PowerShell Errors
Summary: Learn how to change the color of Windows PowerShell errors. Hey, Scripting Guy! Question How can I change the color of Windows ......
Read more >
Set-PSReadLineOption (PSReadLine) - PowerShell
This example sets PSReadLine to display the Comment token with green foreground text on a gray background. In the escape sequence used in...
Read more >
Windows Terminal Themes Only Seem To Change ...
I just want it where my text is different colored throughout the terminal. ... The Darcula theme works not because of the colors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found