Skip to content

Terminal Colorization in Powershell #1649

Description

@nevsal

The Powershell initialization script scripts/WinPython_PS_Prompt.ps1 changes the color of the terminal.

### Colorize to distinguish
$host.ui.RawUI.BackgroundColor = "Black"
$host.ui.RawUI.ForegroundColor = "White"

When calling WinPython_PS_Prompt.ps1 from other scripts one has to reset terminal colors afterwards (and if only to defaults) for it not to affect later terminal output.

Is there any objective necessity for it?

If not, I suggest removal of these calls.

--

For those running into this problem, a current fix in a parent script is to call

[Console]::ResetColor() # fix WinPython setting $host.ui.RawUI.BackgroundColor and .ForegroundColor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions