JanDeDobbeleer / oh-my-posh2

A prompt theming engine for Powershell
MIT License
5.19k stars 284 forks source link

[System.Console]::ForegroundColor -eq [System.Console]::BackroundColor #332

Closed B4Art closed 3 years ago

B4Art commented 3 years ago

Sometimes for instance using:

$a = (az pipelines show --project <projectname> --name * | ConvertFrom-Json)

Background AND Foreground become the same color. $a does give output but is unreadable. As a bugfix in a theme.psm1 file after the final $prompt you can add the following code

    If ([System.Console]::ForegroundColor -eq [System.Console]::BackroundColor){
        [System.Console]::BackgroundColor = [System.ConsoleColor]::Black
        [System.Console]::ForegroundColor = [System.ConsoleColor]::White
    }
JanDeDobbeleer commented 3 years ago

@B4Art have a look at V3 as I'm not going to resolve this for V2 :-)