-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Labels
Description
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
Just noticed this while reading the code, that PSConsoleReadLineOptions.ResetColors never uses DefaultMemberColor and instead uses DefaultNumberColor twice.
https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Cmdlets.cs#L528-L529Screenshot
N/A
Environment data
PS Version: 7.2.6
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.6
PSReadLine EditMode: Windows
OS: 10.0.22000.184 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 30Steps to reproduce
If you call Get-PSReadLineOption when the options were not modified, MemberColor and NumberColor are the same color, while PSConsoleReadLineOptions.DefaultMemberColor and PSConsoleReadLineOptions.DefaultNumberColor are not.
$ Get-PSReadLineOption
EditMode : Windows
AddToHistoryHandler : System.Func`2[System.String,System.Object]
HistoryNoDuplicates : True
HistorySavePath : C:\Users\jgr\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHo
st_history.txt
HistorySaveStyle : SaveIncrementally
HistorySearchCaseSensitive : False
HistorySearchCursorMovesToEnd : False
MaximumHistoryCount : 4096
ContinuationPrompt : >
ExtraPromptLineCount : 1
PromptText :
BellStyle : Audible
DingDuration : 50
DingTone : 1221
CommandsToValidateScriptBlockArguments : {ForEach-Object, %, Invoke-Command, icm…}
CommandValidationHandler :
CompletionQueryItems : 100
MaximumKillRingCount : 10
ShowToolTips : True
ViModeIndicator : None
WordDelimiters : ;:,.[]{}()/\|^&*-=+'"–—―
AnsiEscapeTimeout : 100
PredictionSource : None
CommandColor : "`e[93m"
CommentColor : "`e[32m"
ContinuationPromptColor : "`e[37m"
DefaultTokenColor : "`e[37m"
EmphasisColor : "`e[96m"
ErrorColor : "`e[91m"
KeywordColor : "`e[92m"
MemberColor : "`e[97m"
NumberColor : "`e[97m"
OperatorColor : "`e[90m"
ParameterColor : "`e[90m"
InlinePredictionColor : "`e[38;5;238m"
SelectionColor : "`e[30;47m"
StringColor : "`e[36m"
TypeColor : "`e[37m"
VariableColor : "`e[92m"
Expected behavior
PSConsoleReadLineOptions.DefaultMemberColor is used when resetting MemberColor.
Actual behavior
PSConsoleReadLineOptions.DefaultNumberColor is used when resetting MemberColor.