Skip to content
ConsoleMonster
Class

ShellPromptFluent

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

The fluent methods of ShellPrompt, generated from its public properties: With... sets a property and Add... adds to a collection, both returning the same instance.

Inheritance

  • object
  • ShellPromptFluent

Methods

public static ShellPrompt WithBranch(ShellPrompt shellPrompt, string? value) #

Sets ShellPrompt.Branch: The branch name, or a detached commit identifier; null omits git information.

Parameters

shellPrompt ConsoleMonster.Widgets.ShellPrompt required
The instance.
value string? required
The value.

Returns

ShellPrompt The same instance.
public static ShellPrompt WithDirty(ShellPrompt shellPrompt, bool value = true) #

Sets ShellPrompt.Dirty: Whether git reported working tree or index changes.

Parameters

shellPrompt ConsoleMonster.Widgets.ShellPrompt required
The instance.
value bool = true optional
The value (default true).

Returns

ShellPrompt The same instance.
public static ShellPrompt WithDuration(ShellPrompt shellPrompt, TimeSpan value) #

Sets ShellPrompt.Duration: The last completed command's duration. Only values strictly above two seconds are shown.

Parameters

shellPrompt ConsoleMonster.Widgets.ShellPrompt required
The instance.
value System.TimeSpan required
The value.

Returns

ShellPrompt The same instance.
public static ShellPrompt WithHome(ShellPrompt shellPrompt, string? value) #

Sets ShellPrompt.Home: The home directory, abbreviated only at a complete path boundary.

Parameters

shellPrompt ConsoleMonster.Widgets.ShellPrompt required
The instance.
value string? required
The value.

Returns

ShellPrompt The same instance.
public static ShellPrompt WithPath(ShellPrompt shellPrompt, string value) #

Sets ShellPrompt.Path: The current provider path.

Parameters

shellPrompt ConsoleMonster.Widgets.ShellPrompt required
The instance.
value string required
The value.

Returns

ShellPrompt The same instance.
public static ShellPrompt WithSucceeded(ShellPrompt shellPrompt, bool value = true) #

Sets ShellPrompt.Succeeded: Whether PowerShell reported the last command as successful.

Parameters

shellPrompt ConsoleMonster.Widgets.ShellPrompt required
The instance.
value bool = true optional
The value (default true).

Returns

ShellPrompt The same instance.