-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
ssh <start typing hostname> --- the hostname is invisible. No matter what color scheme I select. #14242
Comments
Huh. This might be an alternate reality version of this note, which applies to background colors (they're handled by the same code.) All the same, can you share your |
(And, perhaps, would you grab the following powershell output?
|
The main trouble is in the PSReadline options and $PSStyle parameters that know nothing about colorschemes. Everything requires configuration.
Select with the mouse or set it to the clipboard: $PSversionTable | Out-String | Set-Clipboard You can change default foreground color of PSReadline: Set-PSReadLineOption -Color @{'Default' = "`e[38;5;16m"} |
@237dmitry you're right that it's configurable, but also... this text should be showing up in the "default foreground" color. I marked your original comments as off-topic since they may confuse users into thinking that to see text by default they would need to do some configuring. Still, I appreciate you adding additional info to this bug report! The default foreground and background in every color scheme should absolutely be readable and require no Terminal or shell configuration. 🙂 |
I think, PSReadline Team does not think about it. If you launch pwsh without profile
I do not know this parameter changes depend on base 16 colors or not. Rather not. This is static value -- user knows better how to tune host. |
Ah, that's a very good point! The default configuration of PowerShell does display white-on-default-bg. Bah. Thank you! |
|
|
Let me know if I missed any of the output you wanted. As you can see, I caught errors when trying a few of the suggestions above. And, for what it's worth, my background is grey, so even white lettering should not be invisible,,, I think. |
@mgarrett69 it's |
Thanks elsaco PS C:\Users\migarret\Work Folders\Downloads> Get-PSReadLineOption EditMode : Windows |
Alright, so the root cause for this one is that the Anyway, PowerShell is explicitly requesting We've got a couple ways around this. One is this feature that's currently available in preview builds that automatically detects when two colors have poor (or even catastrophic!) contrast and darkens or lightens the foreground color as appropriate to make it visible. Eventually, we'll enable it by default. That re-landed in #13343 and was enhanced in #13512. The other is for you to change the ¹ that is, color ² why it's asking for Now for the kicker. This worked in Terminal 1.14 (actually, this worked in all versions of Terminal between 0.1 (inclusive) and 1.15 (exclusive)!) In 1.15, however, we tore off in PR #13352 a band-aid that we had previously applied to PowerShell (originally applied in #6810). Well, that band-aid was fixing two problems. One, the actual problem. Two, this. We expressly ignored any requests for CSI In so doing, we hid this issue where their default token color is, in fact, Now that we're respecting PowerShell's color choices again, we're bound to run into more cases like this. @mgarrett69 realized that he never tested other color schemes because of our poor and confusing UI for selecting/editing them. 1.16 didn't do so much to help, because the buttons that make it clear that there's actions to take are "below the fold." We should keep ideating there. Tagged for team discussion so we can assess:
|
We talked more with the PsReadline folks today. overall, we felt like the best option wasn't to keep patching an edge case with more heuristics. That would just shift the dissatisfaction around to different users in an elaborate game of wack-a-mole. They acknowledged that yea, the default PsReadline settings aren't configured for a light scheme, they're set up for a dark scheme (for more historical context: PowerShell/PSReadLine#464). They're gonna go ahead and update their docs to better clarify that users who prefer a light scheme should change their PsReadLine settings to match. That's tracked in: MicrosoftDocs/PowerShell-Docs#9358 As an immediate workaround, you should be able to set |
Windows Terminal version
1.16.2642.0
Windows build number
10.0.22621.0
Other Software
No response
Steps to reproduce
Just open a windows terminal and issue a ssh command.
(also seen when I ran [environment]::OsVersion -- the [environment] part of the string is invisible)
Expected Behavior
Here is the copy/paste of what I typed into the terminal (and what came back when I hit enter)
PS C:\Users\migarret\Work Folders\Downloads> ssh imola1
Warning: Permanently added 'xx.xx.xx.xx' (ED25519) to the list of known hosts.
Last login: Mon Oct 17 15:20:33 2022 from xx.xx.xx.xx
AvereOS_2022.08.0
[root@imola1 ~]#
Actual Behavior
The text was updated successfully, but these errors were encountered: