mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-03 15:27:26 -08:00
1.6 KiB
1.6 KiB
id | title | sidebar_label |
---|---|---|
secondary-prompt | Secondary prompt | Secondary prompt |
:::info
This feature only works in powershell
, zsh
and bash
for the time being.
:::
The secondary prompt is displayed when a command text spans multiple lines. The default is >
.
You can use go text/template templates extended with sprig to enrich the text.
Environment variables are available, just like the console_title_template
functionality.
Configuration
You need to extend or create a custom theme with your secondary prompt override. For example:
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
...
],
"secondary_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "-> "
}
}
The configuration has the following properties:
- background:
string
color - foreground:
string
color - template:
string
- A go text/template template extended with sprig utilizing the properties below - defaults to>
Template (info)
.Root
:boolean
- is the current user root/admin or not.Shell
:string
- the current shell name.UserName
:string
- the current user name.HostName
:string
- the host name