mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 13:04:04 -08:00
54 lines
986 B
Plaintext
54 lines
986 B
Plaintext
---
|
|
id: iterm
|
|
title: iTerm
|
|
sidebar_label: iTerm
|
|
---
|
|
|
|
## What
|
|
|
|
Inserts the iTerm2 shell integration prompt mark for zsh, and bash.
|
|
For more information, read the [shell integration page][int-page] on
|
|
the developer's website.
|
|
|
|
:::info
|
|
You will need to add `export ITERM2_SQUELCH_MARK=1` before the shell integration script is sourced.
|
|
:::
|
|
|
|
:::info Fish shell
|
|
For fish, you can make use of Oh My Posh's `set_poshcontext` function to set the prompt mark. Add the
|
|
following line after initialising Oh My Posh:
|
|
|
|
```fish
|
|
function set_poshcontext
|
|
iterm2_prompt_mark
|
|
end
|
|
```
|
|
|
|
You do not need to add this segment.
|
|
:::
|
|
|
|
## Sample Configuration
|
|
|
|
```json
|
|
{
|
|
"type": "iterm",
|
|
"interactive": true,
|
|
"style": "plain",
|
|
"foreground": "#80ffea",
|
|
"template": "{{ .PromptMark }}"
|
|
}
|
|
```
|
|
|
|
## Template ([info][templates])
|
|
|
|
:::note default template
|
|
|
|
```template
|
|
{{ .PromptMark }}
|
|
```
|
|
|
|
:::
|
|
|
|
[templates]: /docs/configuration/templates
|
|
[int-page]: https://iterm2.com/documentation-shell-integration.html
|