当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 获取 PSReadLineOption (PSReadLine)

作者:精品下载站 日期:2024-12-14 02:00:21 浏览:12 分类:玩电脑

获取 PSReadLineOption (PSReadLine)


获取 PSReadLineOption

模块 :PS阅读线

获取可配置选项的值。

句法

Get-PSReadLineOption []

描述

Get-PSReadLineOption cmdlet 返回可使用 Set-PSReadLineOption cmdlet 配置的设置的当前状态。您可以使用返回的对象来更改 PSReadLine 选项。这提供了一种稍微简单的方法来为多种标记设置语法着色选项。

示例

示例 1:获取选项及其值

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"

此命令返回可用 PSReadLine 选项及其当前值的列表。

输入

您无法将对象通过管道传输到此 cmdlet。

输出

PSConsoleReadLineOptions

此 cmdlet 返回当前选项的实例。更改此对象的属性值会直接更新 PSReadLine 中的设置,而无需调用 Set-PSReadLineOption

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯