oh-my-posh/website/docs/segments/shell.mdx

48 lines
728 B
Plaintext
Raw Normal View History

2020-10-05 02:33:12 -07:00
---
id: shell
title: Shell
sidebar_label: Shell
---
## What
2021-07-01 10:35:09 -07:00
Show the current shell name (ZSH, powershell, bash, ...).
2020-10-05 02:33:12 -07:00
## Sample Configuration
```json
{
"type": "shell",
"style": "powerline",
2020-10-15 23:37:43 -07:00
"powerline_symbol": "\uE0B0",
2020-10-05 02:33:12 -07:00
"foreground": "#ffffff",
"background": "#0077c2",
"properties": {
"mapped_shell_names": {
"pwsh": "PS"
}
2020-10-05 02:33:12 -07:00
}
}
```
## Properties
- mapped_shell_names: `object` - custom glyph/text to use in place of specified shell names (case-insensitive)
2022-01-22 10:46:56 -08:00
2022-02-01 03:10:46 -08:00
## Template ([info][templates])
:::note default template
``` template
{{ .Name }}
```
:::
### Properties
2022-01-22 10:46:56 -08:00
- `.Name`: `string` - the shell name
- `.Version`: `string` - the shell version
2022-01-22 10:46:56 -08:00
2022-04-20 09:43:59 -07:00
[templates]: /docs/configuration/templates