-
Notifications
You must be signed in to change notification settings - Fork 511
Warning stream color #2317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not going to reinvent the wheel by reposting a bunch of stuff, instead I'll just link you here: https://learn-powershell.net/2012/08/07/make-your-powershell-errors-less-harsh-by-changing-their-color/ And thank you heavily for this as I'm adding to my AllHosts profile to set the color different because IMHO it was a mistake to make them the same color. Edit because I accidentally posted too early: effectively you can use |
Thank you @corbob . I tend to agree with you that not setting the colors for $VerbosePreference = 'Continue'
$WarningPreference = 'Continue'
$Host.PrivateData.WarningForegroundColor = [System.ConsoleColor]::Yellow
$Host.PrivateData.VerboseForegroundColor = [System.ConsoleColor]::Cyan
Write-Verbose 'Verbose text'
Write-Warning 'Warning tesx'
Write-Verbose 'Verbose text'
Write-Verbose 'Verbose text' The |
I don't think it would be unreasonable to add that as a default, but that might be a PSES thing. Alternatively, perhaps it's something to add to the ISE Compatibility documents. @TylerLeonhardt was asking about things that could be added on Twitter the other day: https://twitter.com/TylerLeonhardt/status/1195750313203945473 On a related note: I found the video I was talking about, and it was from PSHSummit 2018: https://www.youtube.com/watch?v=zhjU24hbYuI#t=4m30s It looks like ISE has a |
It didn't for awhile, support was added in PowerShell/PowerShellEditorServices#654.
Personally I'd prefer we stick to the same thing a standard console does as a default. It's easy enough to customize with a profile imo. |
@SeeminglyScience it depends on what we try to achieve. If all we want is a standard console with default functionality then one could argue that even I'm not a developer but if two people already are adjusting their profiles, then it might be a good suggestion and it might help others who are less experienced and don't want to change their configs. Normally when writing |
When I say "standard console" I mean literally the experience that
Plenty of folks are customizing the colors, that's definitely an important feature. I was really happy to see the PR that added support for those settings. That said, I don't think the fact that folks are interacting with that API to be a compelling reason to change the defaults. Color choices are personal, what works for me may infuriate you (my error stream is Cyan for instance 🙂). If you want the defaults changed, I'd suggest starting with |
Yeah I think we have a unique opportunity here where we can finally have the editor and the console have the same behavior. Consistency. The UI API's are there to give folks the ability to change that consistency both for just PowerShell Integrated Console (via the CurrentUserCurrentHost profile) or for all PowerShell hosts (via CurrentUserAllHosts profile) |
Ok guys, thanks for the feedback. I'm also in favor of consistency so I'll close this one. |
Currently when running the code below the colors for the
Verbose
andWarning
stream are exactly the same. Would it be possible to have a different color forWarning
, just like in thePowerShell ISE
?Results in:

Probably #594 is related.
The text was updated successfully, but these errors were encountered: