@@ -132,26 +132,28 @@ public PSConsoleReadlineOptions()
132
132
133
133
internal void ResetColors ( )
134
134
{
135
- CommentForegroundColor = DefaultCommandForegroundColor ;
136
- KeywordForegroundColor = DefaultKeywordForegroundColor ;
137
- StringForegroundColor = DefaultStringForegroundColor ;
138
- OperatorForegroundColor = DefaultOperatorForegroundColor ;
139
- VariableForegroundColor = DefaultVariableForegroundColor ;
140
- CommandForegroundColor = DefaultCommandForegroundColor ;
141
- ParameterForegroundColor = DefaultParameterForegroundColor ;
142
- TypeForegroundColor = DefaultTypeForegroundColor ;
143
- NumberForegroundColor = DefaultNumberForegroundColor ;
144
- MemberForegroundColor = DefaultNumberForegroundColor ;
145
- CommentBackgroundColor = Console . BackgroundColor ;
146
- KeywordBackgroundColor = Console . BackgroundColor ;
147
- StringBackgroundColor = Console . BackgroundColor ;
148
- OperatorBackgroundColor = Console . BackgroundColor ;
149
- VariableBackgroundColor = Console . BackgroundColor ;
150
- CommandBackgroundColor = Console . BackgroundColor ;
151
- ParameterBackgroundColor = Console . BackgroundColor ;
152
- TypeBackgroundColor = Console . BackgroundColor ;
153
- NumberBackgroundColor = Console . BackgroundColor ;
154
- MemberBackgroundColor = Console . BackgroundColor ;
135
+ DefaultTokenForegroundColor = Console . ForegroundColor ;
136
+ CommentForegroundColor = DefaultCommentForegroundColor ;
137
+ KeywordForegroundColor = DefaultKeywordForegroundColor ;
138
+ StringForegroundColor = DefaultStringForegroundColor ;
139
+ OperatorForegroundColor = DefaultOperatorForegroundColor ;
140
+ VariableForegroundColor = DefaultVariableForegroundColor ;
141
+ CommandForegroundColor = DefaultCommandForegroundColor ;
142
+ ParameterForegroundColor = DefaultParameterForegroundColor ;
143
+ TypeForegroundColor = DefaultTypeForegroundColor ;
144
+ NumberForegroundColor = DefaultNumberForegroundColor ;
145
+ MemberForegroundColor = DefaultNumberForegroundColor ;
146
+ DefaultTokenBackgroundColor = Console . BackgroundColor ;
147
+ CommentBackgroundColor = Console . BackgroundColor ;
148
+ KeywordBackgroundColor = Console . BackgroundColor ;
149
+ StringBackgroundColor = Console . BackgroundColor ;
150
+ OperatorBackgroundColor = Console . BackgroundColor ;
151
+ VariableBackgroundColor = Console . BackgroundColor ;
152
+ CommandBackgroundColor = Console . BackgroundColor ;
153
+ ParameterBackgroundColor = Console . BackgroundColor ;
154
+ TypeBackgroundColor = Console . BackgroundColor ;
155
+ NumberBackgroundColor = Console . BackgroundColor ;
156
+ MemberBackgroundColor = Console . BackgroundColor ;
155
157
}
156
158
157
159
internal void SetForegroundColor ( TokenClassification tokenKind , ConsoleColor color )
@@ -191,6 +193,17 @@ internal void SetBackgroundColor(TokenClassification tokenKind, ConsoleColor col
191
193
}
192
194
}
193
195
196
+ [ Cmdlet ( "Get" , "PSReadlineOption" ) ]
197
+ [ OutputType ( typeof ( PSConsoleReadlineOptions ) ) ]
198
+ public class GetPSReadlineOption : PSCmdlet
199
+ {
200
+ [ ExcludeFromCodeCoverage ]
201
+ protected override void EndProcessing ( )
202
+ {
203
+ WriteObject ( PSConsoleReadLine . GetOptions ( ) ) ;
204
+ }
205
+ }
206
+
194
207
[ Cmdlet ( "Set" , "PSReadlineOption" ) ]
195
208
public class SetPSReadlineOption : PSCmdlet
196
209
{
0 commit comments