pwsh-prompt.xml
|
<?xml version="1.0"?> <doc> <assembly> <name>pwsh-prompt</name> </assembly> <members> <member name="T:PwshPrompt.IO.PathReadLine"> <summary> A readline implementation that supports tab-completion of filesystem paths using PowerShell's built-in <see cref="T:System.Management.Automation.CommandCompletion"/> engine. <para> This is a reusable utility — any cmdlet can instantiate it with a <see cref="T:System.Management.Automation.Host.PSHostUserInterface"/> to get interactive path input with completion. </para> </summary> <example> <code> var input = new PathReadLine("directory").ReadLine(); </code> </example> </member> <member name="M:PwshPrompt.IO.PathReadLine.#ctor(System.String,System.String)"> <param name="expected_type"> Either <c>"file"</c> or <c>"directory"</c>. Controls completion filtering: directories use <c>Set-Location</c>, files use <c>Get-Item</c> as the fake command for the completion engine. </param> <param name="default_value">Optional default path returned when the user submits empty input.</param> </member> <member name="M:PwshPrompt.IO.PathReadLine.ReadLine"> <summary> Reads a line of input with tab completion support. Blocks until the user presses Enter. </summary> <returns>The input string with any completion-engine quotes stripped.</returns> <exception cref="T:System.Management.Automation.PipelineStoppedException">Thrown when the user presses Ctrl+C.</exception> </member> <member name="T:PwshPrompt.Cmdlets.PromptChoiceCmdlet"> <summary> <para>Prompts the user to select one or more items from an interactive picker.</para> <para>Choices are rendered as a navigable list in the terminal. The user selects via arrow keys, digit keys (1-based page-relative), or hotkeys defined on individual items. When <c>-Multiple</c> is set, the user may toggle multiple selections before confirming with Enter.</para> <para><b>Output:</b> An <c>int[]</c> of 0-based indices into the original <c>-Choices</c> array, or <c>$null</c> when the user cancels with Escape or Ctrl-C.</para> <para><b>Terminating errors:</b></para> <list type="bullet"> <item><description><c>ParameterDefinitionError</c> — a parameter was defined incorrectly by the caller (mixed non-hashtable element types in <c>-Choices</c>, missing <c>Value</c> key in a hashtable choice, unknown key in a hashtable choice, <c>-Message</c> or <c>-Title</c> is not a string or hashtable, <c>-Message</c> text exceeds 228 characters, <c>-Default</c> index is out of range, unknown key in <c>-AlternateBuffer</c>). These represent developer mistakes and are thrown during parameter validation in <c>BeginProcessing</c>.</description></item> <item><description><c>NonInteractiveTerminal</c> — the cmdlet requires an interactive terminal (a real console with <c>Console.KeyAvailable</c> support) but none is attached. Thrown during <c>ProcessRecord</c>.</description></item> </list> <para><b>Non-terminating errors:</b> None. All errors are terminating.</para> <para><b>Color format:</b> See <see cref="T:PwshPrompt.Consts.AnsiColor"/> for the color tuple format used by all <c>ForegroundColor</c>/<c>fg</c> and <c>BackgroundColor</c>/<c>bg</c> keys.</para> <para><b>Style format:</b> See <see cref="T:PwshPrompt.Enums.TextStyle"/> for the valid text decoration flags.</para> <para><b>Label format:</b> See <see cref="T:PwshPrompt.Types.Label"/> for the hashtable format used by <c>-Message</c>, <c>-Title</c>, and nested item/pagination configs.</para> <para><b>Buffer configuration:</b> See <see cref="T:PwshPrompt.Configs.BufferConfig"/>, <see cref="T:PwshPrompt.Configs.BorderConfig"/>, <see cref="T:PwshPrompt.Configs.ItemConfig"/>, and <see cref="T:PwshPrompt.Configs.PaginationConfig"/> for the <c>-AlternateBuffer</c> hashtable schema.</para> </summary> <example> <code>Prompt-Choice @("Red", "Green", "Blue") "Pick a color"</code> <para>Presents a single-select picker. Returns the selected index (e.g. <c>@(1)</c> for "Green").</para> </example> <example> <code>$items = @( @{ Value = "dev"; Description = "Development"; HotKey = "d" }, @{ Value = "staging"; HotKey = "s" }, @{ Value = "prod"; Description = "Production"; HotKey = "p" } ) Prompt-Choice $items "Deploy to:" -Multiple</code> <para>Presents a multi-select picker with hotkeys and descriptions.</para> </example> <example> <code>$dbs = @( @{ Value = "Redis"; HelpMessage = "Fast in-memory cache"; Description = "In-memory key-value store.`nSupports pub/sub, streams, and sorted sets." }, @{ Value = "PostgreSQL"; HelpMessage = "Relational DB"; Description = "Advanced open-source relational database.`nFull SQL compliance with JSONB and range types." }, @{ Value = "MongoDB"; HelpMessage = "Document store" } ) Prompt-Choice $dbs "Pick a database"</code> <para>Items with HelpMessage show it dimmed inline (or in the status bar if too long). Items with Description show a first-line preview; press F1 to view the full description.</para> </example> <example> <code>Prompt-Choice @("A","B","C") "Choose" -Default 2 -CycleMode Cycle</code> <para>Pre-selects index 2 ("C") and wraps navigation within the current page.</para> </example> <example> <code>Prompt-Choice @("One","Two","Three") "Select" -AlternateBuffer @{}</code> <para>Renders the picker in the alternate screen buffer with default styling.</para> </example> <example> <code>Prompt-Choice @("Alpha","Beta","Gamma") "Pick one" -AlternateBuffer @{ fg = @("White", "255;255;255") bg = @("DarkBlue", "0;0;139") Border = @{ hs = "═"; vs = "║" tl = "╔"; tr = "╗" bl = "╚"; br = "╝" Color = @("Cyan", "0;255;255") } }</code> <para>Renders in the alternate screen buffer with custom colors and double-line box-drawing border.</para> </example> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.Choices"> <summary> <para>The list of choices to present to the user. Must contain at least one element.</para> <para>Accepts an array of any object type. All non-hashtable elements must share the same type; mixing different non-hashtable types (e.g. strings and integers) throws a terminating <c>ParameterDefinitionError</c>. Hashtable elements may be freely intermixed with any non-hashtable type.</para> <para>Hashtable elements are parsed into <c>Item</c> structs. Valid keys (case-insensitive):</para> <list type="bullet"> <item><description><c>Value</c> (required) — the display text for the choice.</description></item> <item><description><c>Description</c> (alias <c>desc</c>) — full description text. The first line is shown as a dimmed preview under the focused item. Press F1 to open a scrollable details view of the complete description. Supports multi-line text (<c>`n</c> in PowerShell).</description></item> <item><description><c>HotKey</c> (alias <c>hk</c>) — a single character that selects this choice when pressed.</description></item> <item><description><c>HelpMessage</c> (alias <c>help</c>) — short help text shown dimmed inline next to the item when space permits; otherwise displayed in italic in the status bar above the legend.</description></item> <item><description><c>Style</c> — text style (see <see cref="T:PwshPrompt.Enums.TextStyle"/>).</description></item> <item><description><c>ForegroundColor</c> (alias <c>fg</c>) — foreground color (see <see cref="T:PwshPrompt.Consts.AnsiColor"/>).</description></item> <item><description><c>BackgroundColor</c> (alias <c>bg</c>) — background color (see <see cref="T:PwshPrompt.Consts.AnsiColor"/>).</description></item> </list> <para>A hashtable missing the <c>Value</c> key, or containing an unknown key, throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.Message"> <summary> <para>The prompt message displayed above the choice list. Accepts a <see cref="T:PwshPrompt.Types.Label"/> configuration: a plain string or a hashtable.</para> <para>The resolved text must not exceed 228 characters (3 lines × 76 columns). Exceeding this limit throws a terminating <c>ParameterDefinitionError</c>.</para> <para>An invalid type (neither string nor hashtable) throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.Title"> <summary> <para>Optional title displayed above the prompt message. When using the inline renderer, the title defaults to a snow-white foreground with bold styling.</para> <para>Accepts a <see cref="T:PwshPrompt.Types.Label"/> configuration: a plain string or a hashtable.</para> <para>An invalid type (neither string nor hashtable) throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.Default"> <summary> <para>The 0-based index into <c>-Choices</c> to pre-select when the picker appears. Defaults to <c>0</c> (the first item).</para> <para>Must be non-negative (enforced by <c>[ValidateRange]</c>) and less than the number of choices. An out-of-range value throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.CycleMode"> <summary> <para>Arrow-key boundary behavior when the cursor reaches the top or bottom of a page. Valid <see cref="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.CycleMode"/> values:</para> <list type="bullet"> <item><description><c>Next</c> (default) — advances to the next or previous page.</description></item> <item><description><c>Cycle</c> — wraps around within the current page.</description></item> <item><description><c>Stop</c> — halts at the boundary; no movement.</description></item> </list> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.Multiple"> <summary> When set, the user may toggle multiple selections (with Space or hotkeys) before confirming with Enter. The output array contains all selected indices. </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptChoiceCmdlet.AlternateBuffer"> <summary> <para>Renders the picker in the terminal's alternate screen buffer instead of inline. Pass an empty hashtable <c>@{}</c> for default appearance, or customize. See <see cref="T:PwshPrompt.Configs.BufferConfig"/> for the full hashtable schema.</para> <para>Hashtable keys (case-insensitive):</para> <list type="bullet"> <item><description><c>ForegroundColor</c> / <c>fg</c> — base foreground color (see <see cref="T:PwshPrompt.Consts.AnsiColor"/>).</description></item> <item><description><c>BackgroundColor</c> / <c>bg</c> — base background color (see <see cref="T:PwshPrompt.Consts.AnsiColor"/>).</description></item> <item><description><c>Border</c> — border characters and color (see <see cref="T:PwshPrompt.Configs.BorderConfig"/>).</description></item> <item><description><c>Item</c> — item appearance and multi-select indicators (see <see cref="T:PwshPrompt.Configs.ItemConfig"/>).</description></item> <item><description><c>Pagination</c> — pagination indicator labels (see <see cref="T:PwshPrompt.Configs.PaginationConfig"/>).</description></item> </list> <para>An unknown key throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="M:PwshPrompt.Cmdlets.PromptChoiceCmdlet.BeginProcessing"> <inheritdoc /> </member> <member name="M:PwshPrompt.Cmdlets.PromptChoiceCmdlet.ProcessRecord"> <inheritdoc /> </member> <member name="T:PwshPrompt.Cmdlets.PromptInputCmdlet"> <summary> <para>Prompts the user for typed input with optional validation, type coercion, and retry logic.</para> <para><b>Retry behavior:</b> By default the cmdlet re-prompts indefinitely until valid input is received. To limit retries, use <c>-AttemptsAllotment</c> (alias <c>-Attempts</c>) to cap the number of attempts, or use <c>-ErrorAction Stop</c> to terminate on the first invalid input. When the attempt limit is reached a terminating <c>AttemptsExhausted</c> error is thrown.</para> <para><b>ErrorAction scope:</b> The <c>-ErrorAction</c> preference only affects non-terminating errors emitted during the retry loop (ErrorIds: <c>InputRequired</c>, <c>InvalidInputType</c>). All other errors are terminating and cannot be suppressed with <c>-ErrorAction</c>.</para> <para><b>Terminating errors:</b></para> <list type="bullet"> <item><description><c>ParameterDefinitionError</c> — a parameter was defined incorrectly by the caller (invalid Culture name, Message/Title is not a string or hashtable, Validation scriptblock returned an unexpected shape or threw an unexpected exception). These represent developer mistakes.</description></item> <item><description><c>AttemptsExhausted</c> — the user exceeded the allowed number of input attempts.</description></item> </list> <para><b>Non-terminating errors (retry loop):</b></para> <list type="bullet"> <item><description><c>InputRequired</c> — empty input when <c>-AllowNull</c> is not set and no <c>-Default</c> is provided.</description></item> <item><description><c>InvalidInputType</c> — input could not be converted to <c>-ExpectedType</c> or failed <c>-Validation</c>.</description></item> </list> </summary> <example> <code>Prompt-Input "Enter your name"</code> <para>Prompts indefinitely until a non-empty string is entered.</para> </example> <example> <code>Prompt-Input "Pick a number" -ExpectedType int -AttemptsAllotment 3</code> <para>Allows at most 3 attempts to enter a valid integer before throwing a terminating error.</para> </example> <example> <code>Prompt-Input "Config dir" -ExpectedType directory -Default "~/.config"</code> <para>Prompts for an existing directory with tab completion; defaults to ~/.config on empty input.</para> </example> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Message"> <summary> <para>The prompt message to display to the user. Accepts a <see cref="T:PwshPrompt.Types.Label"/> configuration: a plain string or a hashtable.</para> <para>An invalid type (neither string nor hashtable) throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Title"> <summary> <para>Optional title displayed above the prompt. Defaults to bold styling. Accepts a <see cref="T:PwshPrompt.Types.Label"/> configuration: a plain string or a hashtable.</para> <para>An invalid type (neither string nor hashtable) throws a terminating <c>ParameterDefinitionError</c>.</para> </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Default"> <summary> The default value returned when the user submits empty input. Displayed as <c>(default: value)</c> in the prompt. </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.ExpectedType"> <summary> The expected type that user input is coerced to. Defaults to <c>"string"</c>. The output object type varies accordingly (see the cmdlet's OutputType attributes). Case-sensitive. For <c>"directory"</c> and <c>"file"</c>, tab completion of filesystem paths is enabled. </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Validation"> <summary> Optional scriptblock invoked after type coercion succeeds. The coerced value is available as <c>$_</c> (pipeline variable) and <c>$args[0]</c>. Must return a single tuple <c>@($ok, $message)</c> where <c>$ok</c> is <c>[bool]</c> and <c>$message</c> is <c>[string]</c> or <c>$null</c>. When <c>$ok</c> is <c>$false</c>, the <c>$message</c> is shown and the user is re-prompted. Only invoked on non-null values. A scriptblock that returns an unexpected shape throws a terminating <c>ParameterDefinitionError</c>. </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.AttemptsAllotment"> <summary> Maximum number of input attempts before a terminating <c>AttemptsExhausted</c> error is thrown. When omitted, the user may retry indefinitely unless <c>-ErrorAction Stop</c> is used. </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Culture"> <summary> Overrides the current culture used for parsing culture-sensitive types (byte, short, ushort, int, uint, long, ulong, float, double, decimal, date, datetime, time). Accepts a culture name such as <c>"en-US"</c> or <c>"de-DE"</c>. An invalid culture name throws a terminating <c>ParameterDefinitionError</c>. </summary> </member> <member name="P:PwshPrompt.Cmdlets.PromptInputCmdlet.AllowNull"> <summary> When set, allows the user to press Enter without typing anything. The cmdlet outputs <c>$null</c> instead of re-prompting. Without this switch, empty input produces a non-terminating <c>InputRequired</c> error and re-prompts. </summary> </member> <member name="M:PwshPrompt.Cmdlets.PromptInputCmdlet.BeginProcessing"> <inheritdoc /> </member> <member name="M:PwshPrompt.Cmdlets.PromptInputCmdlet.ProcessRecord"> <inheritdoc /> </member> <member name="M:PwshPrompt.Cmdlets.PromptInputCmdlet.Cast(System.String)"> <summary> Casts the user input string to the type specified by <see cref="P:PwshPrompt.Cmdlets.PromptInputCmdlet.ExpectedType"/>. </summary> <param name="input">The raw string input from the user.</param> <returns> The converted value based on <see cref="P:PwshPrompt.Cmdlets.PromptInputCmdlet.ExpectedType"/>: <list type="bullet"> <item><description><c>"bool"</c> — <see cref="T:System.Boolean"/></description></item> <item><description><c>"byte"</c> — <see cref="T:System.Byte"/></description></item> <item><description><c>"char"</c> — <see cref="T:System.Char"/></description></item> <item><description><c>"string"</c> — <see cref="T:System.String"/></description></item> <item><description><c>"short"</c> — <see cref="T:System.Int16"/></description></item> <item><description><c>"ushort"</c> — <see cref="T:System.UInt16"/></description></item> <item><description><c>"int"</c> or <c>"integer"</c> — <see cref="T:System.Int32"/></description></item> <item><description><c>"uint"</c> — <see cref="T:System.UInt32"/></description></item> <item><description><c>"long"</c> — <see cref="T:System.Int64"/></description></item> <item><description><c>"ulong"</c> — <see cref="T:System.UInt64"/></description></item> <item><description><c>"float"</c> — <see cref="T:System.Single"/></description></item> <item><description><c>"double"</c> — <see cref="T:System.Double"/></description></item> <item><description><c>"decimal"</c> — <see cref="T:System.Decimal"/></description></item> <item><description><c>"directory"</c> — <see cref="T:System.IO.DirectoryInfo"/> (must exist on disk)</description></item> <item><description><c>"file"</c> — <see cref="T:System.IO.FileInfo"/> (must exist on disk)</description></item> <item><description><c>"regex"</c> — <see cref="T:System.Text.RegularExpressions.Regex"/></description></item> <item><description><c>"guid"</c> — <see cref="T:System.Guid"/></description></item> <item><description><c>"version"</c> — <see cref="T:System.Version"/></description></item> <item><description><c>"uri"</c> — <see cref="T:System.Uri"/> (must be absolute)</description></item> <item><description><c>"date"</c> — <see cref="T:System.DateOnly"/></description></item> <item><description><c>"datetime"</c> — <see cref="T:System.DateTime"/></description></item> <item><description><c>"time"</c> — <see cref="T:System.TimeOnly"/></description></item> </list> </returns> <exception cref="T:System.Management.Automation.PSInvalidCastException">Thrown when the input cannot be converted to the expected type.</exception> </member> <member name="M:PwshPrompt.Cmdlets.PromptInputCmdlet.ResolveDirectory(System.String)"> <summary> Resolves a PowerShell path string to a <see cref="T:System.IO.DirectoryInfo"/> for an existing directory. Handles PS path provider resolution (relative paths, drive-qualified paths). </summary> <param name="input">The raw path string entered by the user.</param> <returns>A <see cref="T:System.IO.DirectoryInfo"/> for an existing directory.</returns> <exception cref="T:System.Management.Automation.PSInvalidCastException">Thrown when the path cannot be resolved or the directory does not exist.</exception> </member> <member name="M:PwshPrompt.Cmdlets.PromptInputCmdlet.ResolveFile(System.String)"> <summary> Resolves a PowerShell path string to a <see cref="T:System.IO.FileInfo"/> for an existing file. Handles PS path provider resolution (relative paths, drive-qualified paths). </summary> <param name="input">The raw path string entered by the user.</param> <returns>A <see cref="T:System.IO.FileInfo"/> for an existing file.</returns> <exception cref="T:System.Management.Automation.PSInvalidCastException">Thrown when the path cannot be resolved or the file does not exist.</exception> </member> <member name="M:PwshPrompt.Cmdlets.PromptInputCmdlet.InvokeValidation(System.Object)"> <summary> Invokes the <see cref="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Validation"/> scriptblock against <paramref name="input"/>. Returns <c>(true, null)</c> immediately when <see cref="P:PwshPrompt.Cmdlets.PromptInputCmdlet.Validation"/> is <c>null</c>. On a failing result emits a non-terminating <c>InvalidInputType</c> error via <see cref="M:System.Management.Automation.Cmdlet.WriteError(System.Management.Automation.ErrorRecord)"/>; the caller should <c>continue</c> the retry loop when <c>ok</c> is <c>false</c>. Throws a terminating <c>ParameterDefinitionError</c> if the scriptblock returns an unexpected shape or throws an unexpected exception. </summary> <param name="input">The coerced value to validate (or the raw string for the <c>"string"</c> type).</param> <returns>A tuple of <c>(ok, message)</c>.</returns> </member> <member name="T:PwshPrompt.Consts.Colors"> <summary> Predefined color tuples for all <see cref="T:System.ConsoleColor"/> members. Each property returns a 2-element string array compatible with any color parameter in pwsh-prompt (ForegroundColor, BackgroundColor, etc.). Only ConsoleColor values are supported; for custom 256-color indices or arbitrary RGB values, use the manual tuple format: @("index", "r;g;b"). Registered as a <c>[Colors]</c> type accelerator on module import. </summary> </member> <member name="P:PwshPrompt.Consts.Colors.BLACK"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Black"/> (index 0).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKRED"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkRed"/> (index 1).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKGREEN"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkGreen"/> (index 2).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKYELLOW"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkYellow"/> (index 3).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKBLUE"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkBlue"/> (index 4).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKMAGENTA"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkMagenta"/> (index 5).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKCYAN"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkCyan"/> (index 6).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.GRAY"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Gray"/> (index 7).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.DARKGRAY"> <summary>Color tuple for <see cref="F:System.ConsoleColor.DarkGray"/> (index 8).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.RED"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Red"/> (index 9).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.GREEN"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Green"/> (index 10).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.YELLOW"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Yellow"/> (index 11).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.BLUE"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Blue"/> (index 12).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.MAGENTA"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Magenta"/> (index 13).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.CYAN"> <summary>Color tuple for <see cref="F:System.ConsoleColor.Cyan"/> (index 14).</summary> </member> <member name="P:PwshPrompt.Consts.Colors.WHITE"> <summary>Color tuple for <see cref="F:System.ConsoleColor.White"/> (index 15).</summary> </member> <member name="T:PwshPrompt.Enums.CycleMode"> <summary>Controls what happens when the user moves past the last item.</summary> </member> <member name="F:PwshPrompt.Enums.CycleMode.Next"> <summary>Advance to the next group (if any).</summary> </member> <member name="F:PwshPrompt.Enums.CycleMode.Cycle"> <summary>Wrap around to the first item.</summary> </member> <member name="F:PwshPrompt.Enums.CycleMode.Stop"> <summary>Stay on the current item.</summary> </member> <member name="T:PwshPrompt.Enums.TextStyle"> <summary>ANSI text-decoration flags (combinable via bitwise OR).</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.None"> <summary>No styling.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Bold"> <summary>SGR 1 — bold / increased intensity.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Dim"> <summary>SGR 2 — dim / faint.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Italic"> <summary>SGR 3 — italic.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Underline"> <summary>SGR 4 — underline.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.SlowBlink"> <summary>SGR 5 — slow blink.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.RapidBlink"> <summary>SGR 6 — rapid blink.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Reverse"> <summary>SGR 7 — reverse video.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Hidden"> <summary>SGR 8 — hidden / conceal.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Strikethrough"> <summary>SGR 9 — strikethrough.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.DoubleUnderline"> <summary>SGR 21 — double underline.</summary> </member> <member name="F:PwshPrompt.Enums.TextStyle.Overline"> <summary>SGR 53 — overline.</summary> </member> <member name="T:PwshPrompt.ModuleInit"> <summary> Registers and removes custom type accelerators on module import/removal. </summary> </member> <member name="M:PwshPrompt.ModuleInit.OnImport"> <inheritdoc /> </member> <member name="M:PwshPrompt.ModuleInit.OnRemove(System.Management.Automation.PSModuleInfo)"> <inheritdoc /> </member> <member name="M:PwshPrompt.Types.Items.FromParameter(System.Object[],System.String)"> <summary> Validates and converts a raw parameter array into an <see cref="T:PwshPrompt.Types.Items"/> instance. All elements must be the same type, or a hashtable. Hashtable elements are validated against the <see cref="T:PwshPrompt.Types.Item"/> key structure and converted. Non-hashtable elements are wrapped in an Item with only Value set. </summary> <param name="choices">The raw parameter array.</param> <param name="parameterName">The parameter name for error messages.</param> <returns>An <see cref="T:PwshPrompt.Types.Items"/> instance containing validated <see cref="T:PwshPrompt.Types.Item"/> entries.</returns> <exception cref="T:System.Management.Automation.PSArgumentException"> Thrown when elements are mixed types, a hashtable has unknown keys, or a hashtable is missing the required 'Value' key. </exception> </member> <member name="T:PwshPrompt.Types.Label"> <summary> <para>A styled-text unit combining text content, foreground/background colors, and text decoration.</para> <para>Accepts a plain <c>[string]</c> or a <c>[hashtable]</c> with the following keys (case-insensitive):</para> <list type="bullet"> <item><description><c>Text</c> (<c>[string]</c>, required) — the display text.</description></item> <item><description><c>ForegroundColor</c> (alias <c>fg</c>, <c>[string, string]</c>) — foreground color tuple.</description></item> <item><description><c>BackgroundColor</c> (alias <c>bg</c>, <c>[string, string]</c>) — background color tuple.</description></item> <item><description><c>Style</c> (<c>[string]</c>) — comma-separated <see cref="T:PwshPrompt.Enums.TextStyle"/> flags.</description></item> </list> </summary> </member> <member name="M:PwshPrompt.Utils.StringExtensions.ParseRegex(System.String)"> <summary> Compiles the string as a <see cref="T:System.Text.RegularExpressions.Regex"/>. </summary> <returns>A compiled <see cref="T:System.Text.RegularExpressions.Regex"/>.</returns> <exception cref="T:System.Management.Automation.PSInvalidCastException">Thrown when the pattern is syntactically invalid.</exception> </member> <member name="M:PwshPrompt.Utils.StringExtensions.ElementWidth(System.String)"> <summary> Returns the terminal cell width of a single grapheme cluster. Wcwidth uses legacy wcswidth tables that underreport width for two cases that modern terminals (Ghostty, Kitty, etc.) handle per the Unicode standard: 1. U+FE0F (Variation Selector 16) forces emoji presentation, making the base character 2 cells wide (e.g. ☑️ = U+2611 + FE0F). 2. Supplementary-plane pictographs (>= U+10000) like 🗙 (U+1F5D9) that have East_Asian_Width=Neutral but render as 2 cells. Detected via .NET's UnicodeCategory (updates with the runtime). </summary> </member> </members> </doc> |