@@ -16,6 +16,7 @@ public class PSConsoleReadlineOptions
16
16
public const ConsoleColor DefaultTypeForegroundColor = ConsoleColor . Gray ;
17
17
public const ConsoleColor DefaultNumberForegroundColor = ConsoleColor . White ;
18
18
public const ConsoleColor DefaultMemberForegroundColor = ConsoleColor . Gray ;
19
+ public const ConsoleColor DefaultEmphasisForegroundColor = ConsoleColor . Cyan ;
19
20
20
21
public const string DefaultContinuationPrompt = ">>> " ;
21
22
@@ -133,6 +134,8 @@ public PSConsoleReadlineOptions()
133
134
public ConsoleColor TypeBackgroundColor { get ; set ; }
134
135
public ConsoleColor NumberBackgroundColor { get ; set ; }
135
136
public ConsoleColor MemberBackgroundColor { get ; set ; }
137
+ public ConsoleColor EmphasisForegroundColor { get ; set ; }
138
+ public ConsoleColor EmphasisBackgroundColor { get ; set ; }
136
139
137
140
internal void ResetColors ( )
138
141
{
@@ -147,6 +150,7 @@ internal void ResetColors()
147
150
TypeForegroundColor = DefaultTypeForegroundColor ;
148
151
NumberForegroundColor = DefaultNumberForegroundColor ;
149
152
MemberForegroundColor = DefaultNumberForegroundColor ;
153
+ EmphasisForegroundColor = DefaultEmphasisForegroundColor ;
150
154
DefaultTokenBackgroundColor = Console . BackgroundColor ;
151
155
CommentBackgroundColor = Console . BackgroundColor ;
152
156
KeywordBackgroundColor = Console . BackgroundColor ;
@@ -158,6 +162,7 @@ internal void ResetColors()
158
162
TypeBackgroundColor = Console . BackgroundColor ;
159
163
NumberBackgroundColor = Console . BackgroundColor ;
160
164
MemberBackgroundColor = Console . BackgroundColor ;
165
+ EmphasisBackgroundColor = Console . BackgroundColor ;
161
166
}
162
167
163
168
internal void SetForegroundColor ( TokenClassification tokenKind , ConsoleColor color )
@@ -239,6 +244,22 @@ public ConsoleColor ContinuationPromptBackgroundColor
239
244
}
240
245
internal ConsoleColor ? _continuationPromptBackgroundColor ;
241
246
247
+ [ Parameter ( ParameterSetName = "OptionsSet" ) ]
248
+ public ConsoleColor EmphasisForegroundColor
249
+ {
250
+ get { return _emphasisForegroundColor . GetValueOrDefault ( ) ; }
251
+ set { _emphasisForegroundColor = value ; }
252
+ }
253
+ internal ConsoleColor ? _emphasisForegroundColor ;
254
+
255
+ [ Parameter ( ParameterSetName = "OptionsSet" ) ]
256
+ public ConsoleColor EmphasisBackgroundColor
257
+ {
258
+ get { return _emphasisBackgroundColor . GetValueOrDefault ( ) ; }
259
+ set { _emphasisBackgroundColor = value ; }
260
+ }
261
+ internal ConsoleColor ? _emphasisBackgroundColor ;
262
+
242
263
[ Parameter ( ParameterSetName = "OptionsSet" ) ]
243
264
public SwitchParameter HistoryNoDuplicates
244
265
{
@@ -391,15 +412,15 @@ public class SetKeyHandlerCommand : PSCmdlet
391
412
public string LongDescription { get ; set ; }
392
413
393
414
// ValidateSet attribute is generated by the script GenerateBuiltinList
394
- [ ValidateSet ( "AcceptLine" , "AddLine" , "BackwardChar" , "BackwardDeleteChar" ,
415
+ [ ValidateSet ( "Abort" , " AcceptLine", "AddLine" , "BackwardChar" , "BackwardDeleteChar" ,
395
416
"BackwardDeleteLine" , "BackwardKillLine" , "BackwardWord" , "BeginningOfHistory" , "BeginningOfLine" ,
396
- "CancelLine" , "Complete " , "DeleteChar " , "DisableDemoMode " , "EmacsBackwardWord " ,
397
- "EmacsForwardWord " , "EnableDemoMode " , "EndOfHistory " , "EndOfLine " , "ExchangePointAndMark " ,
398
- "ForwardChar " , "ForwardDeleteLine " , "ForwardWord " , "GotoBrace " , "HistorySearchBackward " ,
399
- "HistorySearchForward " , "KillBackwardWord " , "KillLine " , "KillWord " , "NextHistory " ,
400
- "Paste " , "PossibleCompletions " , "PreviousHistory " , "Redo " , "RevertLine " ,
401
- "SetKeyHandler " , "SetMark " , "TabCompleteNext " , "TabCompletePrevious " , "Undo " ,
402
- "Yank" , "YankPop" ) ]
417
+ "CancelLine" , "ClearScreen " , "Complete " , "DeleteChar " , "DisableDemoMode " ,
418
+ "EmacsBackwardWord " , "EmacsForwardWord " , "EnableDemoMode " , "EndOfHistory " , "EndOfLine " ,
419
+ "ExchangePointAndMark " , "ForwardChar " , "ForwardDeleteLine " , "ForwardSearchHistory " , "ForwardWord " ,
420
+ "GotoBrace " , "HistorySearchBackward " , "HistorySearchForward " , "KillBackwardWord " , "KillLine " ,
421
+ "KillWord " , "NextHistory " , "Paste " , "PossibleCompletions " , "PreviousHistory " ,
422
+ "Redo " , "ReverseSearchHistory " , "RevertLine " , "SetKeyHandler " , "SetMark " ,
423
+ "TabCompleteNext" , "TabCompletePrevious" , "Undo" , " Yank", "YankPop" ) ]
403
424
[ Parameter ( Position = 1 , Mandatory = true , ParameterSetName = "Function" ) ]
404
425
public string Function { get ; set ; }
405
426
0 commit comments