Share via


Get-PSReadLineOption

Obtém valores para as opções que podem ser configuradas.

Syntax

Get-PSReadLineOption []

Description

O Get-PSReadLineOption cmdlet retorna o estado atual das configurações que podem ser configuradas usando o Set-PSReadLineOption cmdlet. Você pode usar o objeto retornado para alterar as opções PSReadLine . Isso fornece uma maneira um pouco mais simples de definir opções de coloração de sintaxe para vários tipos de tokens.

Exemplos

Exemplo 1: Obter opções e seus valores

Get-PSReadLineOption

EditMode                               : Windows
AddToHistoryHandler                    : System.Func`2[System.String,System.Object]
HistoryNoDuplicates                    : True
HistorySavePath                        : C:\Users\user1\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
HistorySaveStyle                       : SaveIncrementally
HistorySearchCaseSensitive             : False
HistorySearchCursorMovesToEnd          : False
MaximumHistoryCount                    : 4096
ContinuationPrompt                     : >>
ExtraPromptLineCount                   : 0
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                       : HistoryAndPlugin
PredictionViewStyle                    : InlineView
TerminateOrphanedConsoleApps           : False
CommandColor                           : "`e[93m"
CommentColor                           : "`e[32m"
ContinuationPromptColor                : "`e[37m"
DefaultTokenColor                      : "`e[37m"
EmphasisColor                          : "`e[96m"
ErrorColor                             : "`e[91m"
InlinePredictionColor                  : "`e[97;2;3m"
KeywordColor                           : "`e[92m"
ListPredictionColor                    : "`e[33m"
ListPredictionSelectedColor            : "`e[48;5;238m"
ListPredictionTooltipColor             : "`e[97;2;3m"
MemberColor                            : "`e[37m"
NumberColor                            : "`e[97m"
OperatorColor                          : "`e[90m"
ParameterColor                         : "`e[90m"
SelectionColor                         : "`e[30;47m"
StringColor                            : "`e[36m"
TypeColor                              : "`e[37m"
VariableColor                          : "`e[92m"

Este comando retorna a lista de opções PSReadLine disponíveis e seus valores atuais.

Entradas

None

Não é possível canalizar objetos para este cmdlet.

Saídas

PSConsoleReadLineOptions

Este cmdlet retorna uma instância das opções atuais. Alterar os valores de propriedade deste objeto atualiza as configurações em PSReadLine diretamente sem invocar Set-PSReadLineOption.