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

50 lines
889 B
Plaintext
Raw Normal View History

2020-10-05 02:33:12 -07:00
---
id: shell
title: Shell
sidebar_label: Shell
---
## What
Show the current shell name (zsh, PowerShell, bash, ...).
2020-10-05 02:33:12 -07:00
## Sample Configuration
2023-03-31 11:55:36 -07:00
import Config from '@site/src/components/Config.js';
<Config data={{
2020-10-05 02:33:12 -07:00
"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
}
2023-03-31 11:55:36 -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
2022-02-01 03:10:46 -08:00
{{ .Name }}
```
:::
### Properties
2022-01-22 10:46:56 -08:00
| Name | Type | Description |
| ---------- | -------- | ----------------- |
| `.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