oh-my-posh/website/docs/segments/iterm.mdx
2023-03-31 21:17:00 +02:00

54 lines
1 KiB
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
import Config from '@site/src/components/Config.js';
<Config data={{
"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