跳转到主内容

辅助提示符

非官方测试版翻译

本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →

信息

该功能目前仅支持 powershellzshbash

当命令文本跨越多行时,会显示辅助提示符,默认值为 >

您可以使用 go text/template 模板,并通过 sprig 进行扩展来丰富文本内容。 环境变量同样可用,这与 console_title_template 功能的使用方式一致。

配置

您需要扩展或创建自定义主题来覆盖辅助提示符设置,例如:

{
"secondary_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "-> "
}
}

选项

NameTypeDescription
backgroundstringcolor
foregroundstringcolor
templatestringa go text/template template extended with sprig utilizing the properties below - defaults to >

模板 (信息)

NameTypeDescription
.Rootbooleanis the current user root/admin or not
.Shellstringthe current shell name
.UserNamestringthe current user name
.HostNamestringthe host name