Get-​PS​Readline​Option

Gets values for the options that can be configured.

Syntax

Get-PSReadlineOption []

Description

The Get-PSReadlineOption returns the current state of the settings that can be configured by using the Set-PSReadlineOption cmdlet. You can use the object that Get-PSReadlineOption returns 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

PS C:\> 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
HistorySavePath                        : C:\Users\TestUser\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_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

You cannot pipe objects to this cmdlet.