Skip to content
ConsoleMonster
Cmdlet

Set-ConsolePrompt

Module
ConsoleMonster
Inputs
None

Sets the shell prompt's presentation and segments.

Syntax

Set-ConsolePrompt
[-Hints]
[-Layout <Compact|TwoLine>]
[-Left <String[]>]
[-Preset <Plain|Powerline|Diamond>]
[-Right <String[]>]
[-Save]
[-Segments <Hashtable>]
[-ShellIntegration]
[-Style <Plain|Powerline|Diamond>]
[-Transient <String[]>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Changes the effective settings for this PowerShell session. Enable-ConsoleFormatting -Include Prompt installs the prompt. With Save, the configuration is also written to the Prompt section of the settings file.

Examples

Example 1

Set-ConsolePrompt -Preset Powerline -Save

Use a two-line prompt preset

Parameters

-Hints SwitchParameter optional
Enable or disable contextual command hints.
-Layout PromptLayout optional
Whether the input marker shares the first line.
Possible values: Compact, TwoLine
-Left String[] optional
The names of segments on the left.
-Preset String optional
Use Plain, Powerline or Diamond as the starting configuration.
Possible values: Plain, Powerline, Diamond
-Right String[] optional
The names of segments on the right.
-Save SwitchParameter optional
Save the prompt configuration to the ConsoleMonster settings file.
-Segments Hashtable optional
A hashtable of segment names and their option hashtables.
-ShellIntegration SwitchParameter optional
Enable or disable terminal marks and current-directory integration.
-Style PromptStyle optional
Presentation of the selected segments.
Possible values: Plain, Powerline, Diamond
-Transient String[] optional
Segments to keep after accepting input. An empty array keeps only the input marker. Null disables transient prompts.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.