PowerShellEditorServices: We need a way to customize output color for error/warning, etc
Specifically, in PowerShell.exe we have the ability to change the color used for errors, warnings, etc.:
C:\PS> $Host.PrivateData
ErrorForegroundColor : DarkRed
ErrorBackgroundColor : Black
WarningForegroundColor : Yellow
WarningBackgroundColor : Black
DebugForegroundColor : Green
DebugBackgroundColor : Black
VerboseForegroundColor : Cyan
VerboseBackgroundColor : Black
ProgressForegroundColor : DarkMagenta
ProgressBackgroundColor : Gray
In VSCode I can change the colors of the 16 ANSI colors, but I can’t find a way to change which of them you are using to write errors out.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 23 (22 by maintainers)
Commits related to this issue
- Add customize output color enhancement (#651) — committed to KeroroLulu/PowerShellEditorServices by deleted user 6 years ago
- Add customize output color enhancement (#651) Supress Warnings in travis Supress Warning in Travis #2 Test for travis Add Comment XML for travis Add Comment for Testing — committed to KeroroLulu/PowerShellEditorServices by deleted user 6 years ago
- Add customize output color enhancement (#654) * Add customize output color enhancement (#651) Supress Warnings in travis Supress Warning in Travis #2 Test for travis Add Comment XML for t... — committed to PowerShell/PowerShellEditorServices by KeroroLulu 6 years ago
If anyone is interested in picking this up the general idea is to
Port ConsoleColorProxy and the PrivateData member from
ConsoleHost
in pwsh to EditorServicesPSHost.PrivateDataChange the Write* methods in EditorServicesPSHostUserInterface to use the new colors
@tylerl0706 Well I changed it in
EditorServicesPSHostInterface
But it doesn’t change in my pwsh
Here’s my
WriteOutput
I did my
Invoke-Build Build
and there’s no errorEdit
It’s really strange, I change my
WriteOutput
But my error foreground color is still red !
Edit 2
Nevermind !! It works that was just a little problem from my installation 😃
I will do the Pull Request !
You can always ask questions too!
Let me know if you have any 👍
@tylerl0706 Thank you 😃
I’m not used to stuff like that, so if I have any questions I’ll ask you !