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:
- json
- yaml
- toml
{
"secondary_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "-> "
}
}
secondary_prompt:
background: transparent
foreground: "#ffffff"
template: "-> "
[secondary_prompt]
background = "transparent"
foreground = "#ffffff"
template = "-> "
Options
| Name | Type | Description |
|---|---|---|
background | string | color |
foreground | string | color |
template | string | a go text/template template extended with sprig utilizing the properties below - defaults to > |
multiline_keepprompt | boolean | when true, a multi-line command is kept in a single buffer so the primary prompt stays in place until the whole command is submitted (Zsh only). Continuation lines are part of that buffer and get no secondary prompt, so template is not rendered for them. Defaults to false |
Template (info)
| Name | Type | Description |
|---|---|---|
.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 |