辅助提示符
非官方测试版翻译
本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
信息
该功能目前仅支持 powershell、zsh 和 bash。
当命令文本跨越多行时,会显示辅助提示符,默认值为 > 。
您可以使用 go text/template 模板,并通过 sprig 进行扩展来丰富文本内容。
环境变量同样可用,这与 console_title_template 功能的使用方式一致。
配置
您需要扩展或创建自定义主题来覆盖辅助提示符设置,例如:
- json
- yaml
- toml
{
"secondary_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "-> "
}
}
secondary_prompt:
background: transparent
foreground: "#ffffff"
template: "-> "
[secondary_prompt]
background = "transparent"
foreground = "#ffffff"
template = "-> "
选项
| 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 > |
模板 (信息)
| 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 |