Class
PromptConfiguration
ConsoleMonster.Prompts
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
- Method PromptConfiguration.FromPreset
- Property ShellPrompt.Configuration
Accepted by parameters 3
- Method PromptEngine.Refresh
- Extension method ShellPrompt.Configuration
- Method ShellPromptFluent.Configuration
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
- layout ConsoleMonster.Prompts.PromptLayout = Compact
- left System.Collections.Generic.IEnumerable<string>? = null
- right System.Collections.Generic.IEnumerable<string>? = null
- transient System.Collections.Generic.IEnumerable<string>? = null
- hints bool = false
- shellIntegration bool = true
- segments System.Collections.Generic.IReadOnlyDictionary<string, ConsoleMonster.Prompts.PromptSegmentOptions>? = null
Methods
public static PromptConfiguration FromPreset(string name) #Starts a configuration from a built-in preset.
Parameters
- name string
Returns
PromptConfigurationInherited Methods
Properties
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 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.