ShellPromptFluent
ConsoleMonster.Widgets
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
- The instance.
- value string?
- The value.
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
- The instance.
- value bool = true
- The value (default true).
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
- The instance.
- value System.TimeSpan
- The value.
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
- The instance.
- value string?
- The value.
public static ShellPrompt WithPath(ShellPrompt shellPrompt, string value) #Sets ShellPrompt.Path: The current provider path.
Parameters
- shellPrompt ConsoleMonster.Widgets.ShellPrompt
- The instance.
- value string
- The value.
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
- The instance.
- value bool = true
- The value (default true).