Skip to content

Can't see what I type ("-", "%", etc are not displayed) #6424

Closed

Description

@CIPop

Environment

Windows build number:  Win32NT             10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): Windows Terminal (Preview) Version: 1.0.1402.0

Any other software?

            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false, 
                "fontFace": "Cascadia Code PL",
                "fontSize": 8,
                "colorScheme": "Solarized Dark"
            },

Steps to reproduce

Enter git -m "123"
Enter test -- -- -- -- -- -- -- -- -- --

Expected behavior

I expect to see what I typed.

Actual behavior

image
image

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 9, 2020
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 9, 2020
  3. DHowett commented on Jun 9, 2020

    @DHowett
    Member

    I cannot recommend the solarized color scheme. The defaults in PowerShell do not interact with it properly. I recommend choosing literally any other theme. Sorry!

  4. CIPop commented on Jun 9, 2020

    @CIPop
    Author

    Dustin L. Howett (@DHowett) No can do: all other schemes are literally wrong 😜. (I was also not asking for a recommendation: I was pointing out a real bug.)

    Joke aside: Cmder works just fine with the same scheme in powershell:
    image

    Any workarounds I can do right now to make it work like forcing the console foreground color?

    Please re-open the issue: if you don't/can't support solarized, please remove the theme (using this bug to track). If you can fix it, please use this issue to track the resolution.

  5. DHowett commented on Jun 9, 2020

    @DHowett
    Member

    (I’m assigning myself to fill in the discussion and handle this bug when I’m not on my phone.)

  6. DHowett commented on Jun 10, 2020

    @DHowett
    Member

    So, there's a few issues at play here.

    1. PowerShell defaults to printing parameters in "bright black" (silly name for gray); this is verifiable with Get-PSReadlineOption in a terminal that isn't set to Solarized right now. image
    2. It looks like the official Solarized palette makes the "bright black" color invisible or barely visible: Color fix needed?  altercation/solarized#220 Invisible text in iTerm, visible when highlighting altercation/solarized#376
    3. Terminal is crushing some colors out of existence (render: defer conversion of TextColor into COLORREF until actual rendering time (avoid ConPTY narrowing bugs) #2661, ConPTY does not support black background #293, don't mind the fact that 293 mentions only the background)
      • PowerShell can be mildly reconfigured to work around issues two and three (footnote 1)
    4. We don't have a color bumping algorithm yet. Cmder (which is actually just ConEmu) does, using DeltaE101. When two colors are too close to eachother, it will nudge them until they're not quite so close. We're tracking that in Implement Delta E 2000 to correct color perception #2638.

    (1)

    Set-PSReadLineOption -Colors @{ Parameter = "`e[38;5;239m"; Operator = "`e[38;5;239m"; }
    

    This will actually force parameters/operators to be gray. Real gray. The way they were intended. It's equally unreadable on the standard Solarized Dark background, but it is at the very least visible.

  7. CIPop commented on Jun 10, 2020

    @CIPop
    Author

    Correction above: `e works only for PS running on .NET Core.

    From #5896 (comment)

    if ($IsCoreCLR) {
        $esc = "`e"
    }
    else {
        $esc = $([char]0x1b)
    }
    
    Set-PSReadLineOption -Colors @{
        Parameter = "$esc[96m"
        Operator  = "$esc[38;5;47m"
        comment   = "$esc[92m"
        String    = "$esc[38;5;51m"
    }

    This works just fine with Solarized Dark:
    image

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

Metadata

Metadata

Labels

Needs-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions