Shell
非官方测试版翻译
本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
功能
显示当前使用的 Shell 名称(如 zsh、PowerShell、bash 等)。
示例配置
- json
- yaml
- toml
{
"type": "shell",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#0077c2",
"options": {
"mapped_shell_names": {
"pwsh": "PS"
}
}
}
type: shell
style: powerline
powerline_symbol:
foreground: "#ffffff"
background: "#0077c2"
options:
mapped_shell_names:
pwsh: PS
type = "shell"
style = "powerline"
powerline_symbol = ""
foreground = "#ffffff"
background = "#0077c2"
[options.mapped_shell_names]
pwsh = "PS"
选项
| Name | Type | Default | Description |
|---|---|---|---|
mapped_shell_names | object | custom glyph/text to use in place of specified shell names (case-insensitive) |
模板 (信息)
默认模板
{{ .Name }}
属性
| Name | Type | Description |
|---|---|---|
.Name | string | the shell name |
.Version | string | the shell version |