跳转到主内容

Shell

非官方测试版翻译

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

功能

显示当前使用的 Shell 名称(如 zsh、PowerShell、bash 等)。

示例配置

{
"type": "shell",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#0077c2",
"options": {
"mapped_shell_names": {
"pwsh": "PS"
}
}
}

选项

NameTypeDefaultDescription
mapped_shell_namesobjectcustom glyph/text to use in place of specified shell names (case-insensitive)

模板 (信息)

默认模板
{{ .Name }}

属性

NameTypeDescription
.Namestringthe shell name
.Versionstringthe shell version