Get-PSReadLineOption
Gets values for the options that can be configured.
Syntax
Get-PSReadLineOption []
Description
The Get-PSReadLineOption
cmdlet returns the current state of the settings that can be configured
by using the Set-PSReadLineOption
cmdlet. You can use the returned object to change
PSReadLine options. This provides a slightly simpler way to set syntax coloring options for
multiple kinds of tokens.
Examples
Example 1: Get options and their values
Get-PSReadLineOption
EditMode : Windows
ContinuationPrompt : >>
ContinuationPromptForegroundColor : DarkYellow
ContinuationPromptBackgroundColor : DarkMagenta
ExtraPromptLineCount : 0
AddToHistoryHandler :
CommandValidationHandler :
CommandsToValidateScriptBlockArguments : {ForEach-Object, %, Invoke-Command, icm...}
HistoryNoDuplicates : False
MaximumHistoryCount : 4096
MaximumKillRingCount : 10
HistorySearchCursorMovesToEnd : False
ShowToolTips : False
DingTone : 1221
CompletionQueryItems : 100
WordDelimiters : ;:,.[]{}()/\|^&*-=+'"
DingDuration : 50
BellStyle : Audible
HistorySearchCaseSensitive : False
ViModeIndicator : None
HistorySavePath : C:\Users\testuser\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\Cons
oleHost_history.txt
HistorySaveStyle : SaveIncrementally
DefaultTokenForegroundColor : DarkYellow
CommentForegroundColor : DarkGreen
KeywordForegroundColor : Green
StringForegroundColor : DarkCyan
OperatorForegroundColor : DarkGray
VariableForegroundColor : Green
CommandForegroundColor : Yellow
ParameterForegroundColor : DarkGray
TypeForegroundColor : Gray
NumberForegroundColor : White
MemberForegroundColor : White
DefaultTokenBackgroundColor : DarkMagenta
CommentBackgroundColor : DarkMagenta
KeywordBackgroundColor : DarkMagenta
StringBackgroundColor : DarkMagenta
OperatorBackgroundColor : DarkMagenta
VariableBackgroundColor : DarkMagenta
CommandBackgroundColor : DarkMagenta
ParameterBackgroundColor : DarkMagenta
TypeBackgroundColor : DarkMagenta
NumberBackgroundColor : DarkMagenta
MemberBackgroundColor : DarkMagenta
EmphasisForegroundColor : Cyan
EmphasisBackgroundColor : DarkMagenta
ErrorForegroundColor : Red
ErrorBackgroundColor : DarkMagenta
This command returns the list of available PSReadLine options and their current values.
Inputs
None
You cannot pipe objects to this cmdlet.