Skip to content
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

Inline Prediction Colour is white/not dim after 2.3.3 upgrade. #3805

Closed
3 tasks done
robinmalik opened this issue Sep 19, 2023 · 4 comments · Fixed by #3808
Closed
3 tasks done

Inline Prediction Colour is white/not dim after 2.3.3 upgrade. #3805

robinmalik opened this issue Sep 19, 2023 · 4 comments · Fixed by #3808
Labels
2.3.3 Issues specific to 2.3.3 Area-Predictors Label for issues related to predictors Resolution-Fixed

Comments

@robinmalik
Copy link

robinmalik commented Sep 19, 2023

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Since upgrading to version 2.3.3 on some of our Windows Servers under PS 5.1, the InlinePredictionColor appears as bright white making it look like a fully/already typed command - this is confusing because there's no visual way to tell if the command has been accepted (tab completed) or not without checking the cursor position. The exact value for this property returned by Get-PSReadLineOption is "$([char]0x1b)[97;2;3m". Under 2.2.6 it is "$([char]0x1b)[38;5;238m" (a grey).

I can see from the release notes:

### [2.3.0-beta0] - 2023-03-07
- Change default color for inline prediction to `dim` (#3493)

I'm not sure what this means exactly, but it also seems to conflict with the change?

Screenshot

2.3.3:

image

2.2.6:

image

Environment data

Name                           Value                                                                                                                                                                                                                                          
----                           -----                                                                                                                                                                                                                                          
PSVersion                      5.1.17763.4644                                                                                                                                                                                                                                 
PSEdition                      Desktop                                                                                                                                                                                                                                        
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                                                        
BuildVersion                   10.0.17763.4644                                                                                                                                                                                                                                
CLRVersion                     4.0.30319.42000                                                                                                                                                                                                                                
WSManStackVersion              3.0                                                                                                                                                                                                                                            
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                                                            
SerializationVersion           1.1.0.1

Steps to reproduce

Upgrade to 2.3.3

Expected behavior

Dimmed prediction style.

Actual behavior

White text.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Sep 19, 2023
@StevenBucher98 StevenBucher98 added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Sep 20, 2023
@StevenBucher98
Copy link
Collaborator

Hi @robinmalik thanks for pointing this out! Turns out that conhost on Windows 10 does not support the dimming and italic font effect and makes it only white. I suggest trying to use Windows PowerShell in latest Windows terminal version and it should be fixed.

@StevenBucher98
Copy link
Collaborator

Apologies forgot Windows Terminal is not installed by default on Windows Server, you can change the prediction color back to old color with this command:

Set-PSReadLineOption -Colors @{ InlinePrediction = "$([char]0x1b)[38;5;238m" }

I suggest putting this command your profile or just disabling predictions by running Set-PSReadLineOption -PredictionSource None

@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR A PR is opened targeting the issue label Sep 21, 2023
@StevenBucher98 StevenBucher98 added Area-Predictors Label for issues related to predictors and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Sep 21, 2023
@privacyguy123
Copy link

Appreciate the one liner fix - a LOT of people using Powershell 7 in Windows Terminal these days though.

@robinmalik
Copy link
Author

@StevenBucher98 Thanks Steven. I'll await the fix to resolve this (I wish Terminal was available for Windows Server!).

@StevenBucher98 StevenBucher98 added the 2.3.3 Issues specific to 2.3.3 label Sep 25, 2023
@daxian-dbw daxian-dbw added Resolution-Fixed and removed Issue-Bug It either shouldn't be doing this or needs an investigation. In-PR A PR is opened targeting the issue labels Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.3.3 Issues specific to 2.3.3 Area-Predictors Label for issues related to predictors Resolution-Fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants