Cmdlet
Set-ConsolePrompt
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 SetsDescription
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 -SaveUse a two-line prompt preset
Parameters
- -Hints SwitchParameter
- Enable or disable contextual command hints.
- -Layout PromptLayout
- Whether the input marker shares the first line.
- Possible values:
Compact,TwoLine - -Left String[]
- The names of segments on the left.
- -Preset String
- Use Plain, Powerline or Diamond as the starting configuration.
- Possible values:
Plain,Powerline,Diamond - -Right String[]
- The names of segments on the right.
- -Save SwitchParameter
- Save the prompt configuration to the ConsoleMonster settings file.
- -Segments Hashtable
- A hashtable of segment names and their option hashtables.
- -ShellIntegration SwitchParameter
- Enable or disable terminal marks and current-directory integration.
- -Style PromptStyle
- Presentation of the selected segments.
- Possible values:
Plain,Powerline,Diamond - -Transient String[]
- 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.