Skip to content
ConsoleMonster
Class

PromptConfiguration

ConsoleMonster.Prompts

Namespace
ConsoleMonster.Prompts
Assembly
ConsoleMonster
Modifiers
sealed

Immutable configuration shared by the shell host and preview.

Inheritance

  • object
  • PromptConfiguration

Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 3

Constructors

public PromptConfiguration(PromptStyle style = Plain, PromptLayout layout = Compact, IEnumerable<string>? left = null, IEnumerable<string>? right = null, IEnumerable<string>? transient = null, bool hints = false, bool shellIntegration = true, IReadOnlyDictionary<string, PromptSegmentOptions>? segments = null) #

Copies the selected segments and presentation settings. A null transient list disables rewrites.

Parameters

style ConsoleMonster.Prompts.PromptStyle = Plain optional
layout ConsoleMonster.Prompts.PromptLayout = Compact optional
left System.Collections.Generic.IEnumerable<string>? = null optional
right System.Collections.Generic.IEnumerable<string>? = null optional
transient System.Collections.Generic.IEnumerable<string>? = null optional
hints bool = false optional
shellIntegration bool = true optional
segments System.Collections.Generic.IReadOnlyDictionary<string, ConsoleMonster.Prompts.PromptSegmentOptions>? = null optional

Methods

public static PromptConfiguration FromPreset(string name) #

Starts a configuration from a built-in preset.

Parameters

name string required

Properties

public PromptStyle Style { get; } #

The configured segment style.

public PromptLayout Layout { get; } #

Whether the input starts on the same line.

public IReadOnlyList<string> Left { get; } #

Segment names at the start of the prompt.

public IReadOnlyList<string> Right { get; } #

Segment names aligned to the far edge.

public IReadOnlyList<string>? Transient { get; } #

Segments retained in scrollback, or null when transient prompts are disabled.

public bool Hints { get; } #

Whether the editor may show command hints.

public bool ShellIntegration { get; } #

Whether a supported terminal receives prompt and directory marks.

public IReadOnlyDictionary<string, PromptSegmentOptions> Segments { get; } #

Overrides for individual segments.

public static IReadOnlyList<string> Presets { get; } #

The available built-in prompt presets.