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

Ability to change the colors outputed by Write-* for -Warning, -Debug, -Error and -Verbose #565

Closed
AdamNaj opened this Issue Jan 14, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@AdamNaj
Member

AdamNaj commented Jan 14, 2016

Basically this functionality should work as in Windows PowerShell, so this code should produce results WPS behaviour:

$Host.UI.RawUI.BackgroundColor = ($bckgrnd = 'DarkRed')
$Host.UI.RawUI.ForegroundColor = 'Cyan'
$Host.PrivateData.ErrorForegroundColor = 'Red'
$Host.PrivateData.ErrorBackgroundColor = $bckgrnd
$Host.PrivateData.WarningForegroundColor = 'Magenta'
$Host.PrivateData.WarningBackgroundColor = $bckgrnd
$Host.PrivateData.DebugForegroundColor = 'Yellow'
$Host.PrivateData.DebugBackgroundColor = $bckgrnd
$Host.PrivateData.VerboseForegroundColor = 'Green'
$Host.PrivateData.VerboseBackgroundColor = $bckgrnd
$Host.PrivateData.ProgressForegroundColor = 'Cyan'
$Host.PrivateData.ProgressBackgroundColor = $bckgrnd
Write-Host    "                    Write-Host                  "
Write-Verbose "                    Write-Verbose               " -Verbose
Write-Error   "                    Write-Error                 "
Write-Warning "                    Write-Warning                 "

However since we are running in a HTML styled scenario this can even be improved and we can retrofit the colors for already typed regular Write-Host text.

image

@AdamNaj AdamNaj added this to the 4.0 milestone Jan 14, 2016

@AdamNaj AdamNaj self-assigned this Jan 14, 2016

AdamNaj added a commit that referenced this issue Jan 14, 2016

@AdamNaj

This comment has been minimized.

Member

AdamNaj commented Jan 14, 2016

Implemented

@AdamNaj AdamNaj closed this Jan 14, 2016

@michaellwest

This comment has been minimized.

Member

michaellwest commented Jan 15, 2016

Nice!

AdamNaj added a commit that referenced this issue Jan 15, 2016

@AdamNaj AdamNaj referenced this issue Feb 10, 2016

Closed

ISE and Console Style Settings Enhancements #416

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment