Some color conflicts with PS and PWSH coloring of command line args #15132

Closed
opened 2026-01-31 04:29:27 +00:00 by claunia · 11 comments
Owner

Originally created by @vefatica on GitHub (Sep 7, 2021).

Windows Terminal version (or Windows build number)

Microsoft Windows 10 Pro for Workstations 10.0.19043.1165 (2009, 21H1) Windows Terminal Preview 1.11.2421.0

Other Software

Powershell, PWSH

Steps to reproduce

In WT, Powershell or PWSH, with "One Half Light" or "Solarized Light", type a command with a decimal number as an argument.

Expected Behavior

The decimal number argument is visible.

Actual Behavior

The argument is not visible. I imagine PS/PWSH isn't scheme-aware and is giving it a color equal to the background color. And I imagine it's not WT's problem.

BTW, WT doesn't automatically find PWSH (Powershell 7), does it?

Originally created by @vefatica on GitHub (Sep 7, 2021). ### Windows Terminal version (or Windows build number) Microsoft Windows 10 Pro for Workstations 10.0.19043.1165 (2009, 21H1) Windows Terminal Preview 1.11.2421.0 ### Other Software Powershell, PWSH ### Steps to reproduce In WT, Powershell or PWSH, with "One Half Light" or "Solarized Light", type a command with a decimal number as an argument. ### Expected Behavior The decimal number argument is visible. ### Actual Behavior The argument is not visible. I imagine PS/PWSH isn't scheme-aware and is giving it a color equal to the background color. And I imagine it's not WT's problem. BTW, WT doesn't automatically find PWSH (Powershell 7), does it?
claunia added the Resolution-Duplicate label 2026-01-31 04:29:27 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2021):

DAYS SINCE I'VE REGRETTED SHIPPING SOLARIZED: 126 0

@zadjii-msft commented on GitHub (Sep 7, 2021): ### [DAYS SINCE I'VE REGRETTED SHIPPING SOLARIZED: ~~126~~ 0](https://github.com/microsoft/terminal/issues/10027#issuecomment-831900824)
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

While I weep about Solarized . . .

BTW, WT doesn't automatically find PWSH (Powershell 7), does it?

It should, if it is installed in a normal place. Knowing you (and the wild things you do), you probably have it installed to Q:\ somewhere.

@DHowett commented on GitHub (Sep 7, 2021): While I weep about Solarized . . . > BTW, WT doesn't automatically find PWSH (Powershell 7), does it? It should, _if_ it is installed in a normal place. Knowing you (and the wild things you do), you probably have it installed to `Q:\` somewhere.
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

Knowing you (and the wild things you do), you probably have it installed to Q:\ somewhere.

Yup, I do things like that, but I think I accepted the default location. It's in

v:\> which pwsh
pwsh is an external : C:\Program Files\PowerShell\7\pwsh.EXE

WT didn't/doesn't find it (that is, doesn't create a profile for it).

@vefatica commented on GitHub (Sep 7, 2021): > Knowing you (and the wild things you do), you probably have it installed to Q:\ somewhere. Yup, I do things like that, but I think I accepted the default location. It's in ``` v:\> which pwsh pwsh is an external : C:\Program Files\PowerShell\7\pwsh.EXE ``` WT didn't/doesn't find it (that is, doesn't create a profile for it).
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

hmmmm. have you put it in disabledProfileSources?

@DHowett commented on GitHub (Sep 7, 2021): hmmmm. have you put it in `disabledProfileSources`?
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

I have these.

    "disabledProfileSources": 
    [
        "Windows.Terminal.Wsl",
        "Windows.Terminal.Azure",
        "Windows.Terminal.PowershellCore"
    ],

I mentioned in another thread (two weeks ago, no respones) that if I'm using an unzipped-only install of WT[P] and I go from the settings UI to settings.json and comment those six lines, WT disappears when I save it in the editor.

@vefatica commented on GitHub (Sep 7, 2021): I have these. ``` "disabledProfileSources": [ "Windows.Terminal.Wsl", "Windows.Terminal.Azure", "Windows.Terminal.PowershellCore" ], ``` I mentioned in another thread (two weeks ago, no respones) that if I'm using an unzipped-only install of WT[P] and I go from the settings UI to settings.json and comment those six lines, WT disappears when I save it in the editor.
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

Does "Windows.Terminal.PowershellCore" refer to both Powershells? I put something like that in settings.json when I first got WT. long before Powershell 7. But I didn't create a specific one after installing PWSH.

@vefatica commented on GitHub (Sep 7, 2021): Does `"Windows.Terminal.PowershellCore"` refer to both Powershells? I put something like that in settings.json when I first got WT. long before Powershell 7. But I didn't create a specific one after installing PWSH.
Author
Owner

@zadjii-msft commented on GitHub (Sep 8, 2021):

Does "Windows.Terminal.PowershellCore" refer to both Powershells?

The "Windows.Terminal.PowershellCore" generator is for all(?) versions of pwsh.exe, but not the powershell.exe (PowerShell 5) that ships with Windows.


In general, Solarized is just a bad scheme, and we feel bad for shipping it, and it shouldn't be used with PowerShell. We're gonna make it better in /dup #2638, and hopefully just silently remove it in /dup #6997

@zadjii-msft commented on GitHub (Sep 8, 2021): > Does `"Windows.Terminal.PowershellCore"` refer to both Powershells? The `"Windows.Terminal.PowershellCore"` generator is for all(?) versions of `pwsh.exe`, but not the powershell.exe (PowerShell 5) that ships with Windows. <hr> In general, Solarized is just a bad scheme, and we feel bad for shipping it, and it shouldn't be used with PowerShell. We're gonna make it better in /dup #2638, and hopefully just silently remove it in /dup #6997
Author
Owner

@ghost commented on GitHub (Sep 8, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Sep 8, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@vefatica commented on GitHub (Sep 8, 2021):

What would one put in "disabledProfileSources" to disable the powershell.exe one? The docs mention only these:

"Windows.Terminal.Wsl", "Windows.Terminal.Azure", and/or "Windows.Terminal.PowershellCore"

A quick question ... WT redraws the viewport and history upon an OSC4/10/11/12(that's nice). If I'm sending 19 of them would I gain anything by putting them all in a big string and calling WriteConsoleW only once (as opposed to doing them one at a time in a loop)?

Thanks!

@vefatica commented on GitHub (Sep 8, 2021): What would one put in "disabledProfileSources" to disable the powershell.exe one? The docs mention only these: `"Windows.Terminal.Wsl", "Windows.Terminal.Azure", and/or "Windows.Terminal.PowershellCore"` A quick question ... WT redraws the viewport and history upon an OSC4/10/11/12(that's nice). If I'm sending 19 of them would I gain anything by putting them all in a big string and calling WriteConsoleW only once (as opposed to doing them one at a time in a loop)? Thanks!
Author
Owner

@zadjii-msft commented on GitHub (Sep 8, 2021):

The powershell.exe profile isn't dynamic, it's a hardcoded default profile. You'll have to set hidden: true on that one manually.

A quick question ... WT redraws the viewport and history upon an OSC4/10/11/12(that's nice). If I'm sending 19 of them would I gain anything by putting them all in a big string and calling WriteConsoleW only once (as opposed to doing them one at a time in a loop)?

Maybe, but probably not? ConPTY and Terminal both throttle frames, so at the end of the day, the screen's only going to get updated once per 1/60th of a second, so there's only a marginal chance that the frame actually gets called in the middle of that output.

@zadjii-msft commented on GitHub (Sep 8, 2021): The `powershell.exe` profile isn't _dynamic_, it's a hardcoded default profile. You'll have to set `hidden: true` on that one manually. > A quick question ... WT redraws the viewport and history upon an OSC4/10/11/12(that's nice). If I'm sending 19 of them would I gain anything by putting them all in a big string and calling WriteConsoleW only once (as opposed to doing them one at a time in a loop)? Maybe, but probably not? ConPTY and Terminal both throttle frames, so at the end of the day, the screen's only going to get updated once per 1/60th of a second, so there's only a marginal chance that the frame actually gets called in the middle of that output.
Author
Owner

@vefatica commented on GitHub (Sep 8, 2021):

Aha! So it's not updated with every OSC (I should have figured that it was done at regular intervals). Thanks!

@vefatica commented on GitHub (Sep 8, 2021): Aha! So it's not updated with every OSC (I should have figured that it was done at regular intervals). Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15132