Partager via


PSConsoleReadLineOptions Class

Definition

public ref class PSConsoleReadlineOptions
[Windows::Foundation::Metadata::WebHostHidden]
class PSConsoleReadlineOptions
public class PSConsoleReadLineOptions
type PSConsoleReadLineOptions = class
Public Class PSConsoleReadLineOptions
Inheritance
PSConsoleReadLineOptions

Constructors

PSConsoleReadLineOptions(String)

Fields

DefaultAnsiEscapeTimeout

How long in milliseconds should we wait before concluding the input is not an escape sequence?

DefaultBellStyle

When ringing the bell, what should be done?

DefaultCommandColor
DefaultCommentColor
DefaultCompletionQueryItems
DefaultContinuationPrompt
DefaultDingDuration
DefaultDingTone

When ringing the bell, what frequency do we use?

DefaultEditMode
DefaultEmphasisColor
DefaultErrorColor
DefaultExtraPromptLineCount
DefaultHistoryNoDuplicates
DefaultHistorySaveStyle
DefaultHistorySearchCaseSensitive
DefaultHistorySearchCursorMovesToEnd

In Emacs, when searching history, the cursor doesn't move. In 4NT, the cursor moves to the end. This option allows for either behavior.

DefaultKeywordColor
DefaultMaximumHistoryCount

The maximum number of commands to store in the history.

DefaultMaximumKillRingCount

The maximum number of items to store in the kill ring.

DefaultMemberColor
DefaultNumberColor
DefaultOperatorColor
DefaultParameterColor
DefaultShowToolTips

When displaying possible completions, either display tooltips or display just the completions.

DefaultStringColor
DefaultTypeColor
DefaultVariableColor
DefaultWordDelimiters

Properties

AddToHistoryHandler

This handler is called before adding a command line to history. The return value indicates if the command line should be added to history or not.

AnsiEscapeTimeout

How long in milliseconds should we wait before concluding the input is not an escape sequence?

BellStyle
CommandColor
CommandsToValidateScriptBlockArguments

Most commands do not accept script blocks, but for those that do, we want to validate commands in the script block arguments. Unfortunately, we can't know how the argument is used. In the worst case, for commands like Get-ADUser, the script block actually specifies a different language.

Because we can't know ahead of time all of the commands that do odd things with script blocks, we create a white-list of commands that do invoke the script block - this covers the most useful cases.

CommandValidationHandler

This handler is called from ValidateAndAcceptLine. If an exception is thrown, validation fails and the error is reported.

CommentColor
CompletionQueryItems
ContinuationPrompt
ContinuationPromptColor
DefaultTokenColor
DingDuration

When ringing the bell, how long (in ms)?

DingTone
EditMode
EmphasisColor
ErrorColor
ExtraPromptLineCount

Prompts are typically 1 line, but sometimes they may span lines. This count is used to make sure we can display the full prompt after showing ambiguous completions

HistoryNoDuplicates

When true, duplicates will not be recalled from history more than once.

HistorySavePath

The path to the saved history.

HistorySaveStyle
HistorySearchCaseSensitive
HistorySearchCursorMovesToEnd
KeywordColor
MaximumHistoryCount
MaximumKillRingCount
MemberColor
NumberColor
OperatorColor
ParameterColor
PromptText

This is the text you want turned red on parse errors, but must occur immediately before the cursor when readline starts. If the prompt function is pure, this value can be inferred, e.g. the default prompt will use "> " for this value.

SelectionColor
ShowToolTips
StringColor
TypeColor
VariableColor
ViModeIndicator
WordDelimiters

Applies to