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.

faint color attribute "leaks" to the whole command line

See original GitHub issue

Environment

PS version: 7.0.3
PSReadline version: 2.1.0-rc1
os: 10.0.19041.561 (WinBuild.160101.0800)
PS file version: 7.0.3.0
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 110
BufferHeight: 30

Exception report

Steps to reproduce

run

Set-PSReadLineOption -Colors  @{Command = "`e[2;93m"}

and then type a command line with some parameters

Expected behavior

only the command gets the faint color

Actual behavior

the faint color attribute is never reset which results in the hole command line being faint

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
daxian-dbwcommented, Oct 30, 2020

@LuanVSO Thanks for reporting the issue. Font effects are not reset properly for most of the token colors, such as the CommentColor.

1reaction
daxian-dbwcommented, Nov 12, 2020

@DEberhardt Thanks for reporting the issue. I took a look and it turns out the bleed-through problem for the repro Get-PSReadLineOption | FL * is an issue in the PowerShell formatting system. The PowerShell formatting system obviously doesn’t expect the value of a property contains VT sequences. Maybe it’s by-design, because that’s rare and Get-PSReadLineOption already has a custom formatting to handle it. Please open an issue in the PowerShell repo if you want to.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Colorizing your terminal and shell environment?
I try to use color on the command line, because color makes the output more useful and intuitive. What options exist to add...
Read more >
green - GeeksforGeeks
Color is an inbuilt command found inside the Windows Command ... COLOR [attr] attr - Specifies the color attribute of console output.
Read more >
bash - How to change the output color of echo in Linux
I want to print the text in a red color. How can I do that? linux · bash · command-line · echo ·...
Read more >
Annotated List of Command-line Options
Below is list of command-line options recognized by the ImageMagick command-line ... See Image Geometry for complete details about the geometry argument.
Read more >
How can I fix the dull colors I am getting in Ubuntu 19.04 ...
Decide what colors and attributes you want to have in your prompt, and modify it accordingly. If you want to have a bright...
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