2022-04-29 14:22:12 -07:00
|
|
|
---
|
|
|
|
id: iterm
|
|
|
|
title: iTerm
|
|
|
|
sidebar_label: iTerm
|
|
|
|
---
|
|
|
|
|
|
|
|
## What
|
|
|
|
|
2023-02-05 12:30:10 -08:00
|
|
|
Inserts the iTerm2 shell integration prompt mark for zsh, and bash.
|
2022-04-29 14:22:12 -07:00
|
|
|
For more information, read the [shell integration page][int-page] on
|
|
|
|
the developer's website.
|
|
|
|
|
|
|
|
:::info
|
2023-02-05 12:30:10 -08:00
|
|
|
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.
|
2022-04-29 14:22:12 -07:00
|
|
|
:::
|
|
|
|
|
|
|
|
## Sample Configuration
|
|
|
|
|
2023-03-31 11:55:36 -07:00
|
|
|
import Config from '@site/src/components/Config.js';
|
|
|
|
|
|
|
|
<Config data={{
|
2022-04-29 14:22:12 -07:00
|
|
|
"type": "iterm",
|
2022-10-12 04:05:42 -07:00
|
|
|
"interactive": true,
|
2022-04-29 14:22:12 -07:00
|
|
|
"style": "plain",
|
|
|
|
"foreground": "#80ffea",
|
|
|
|
"template": "{{ .PromptMark }}"
|
2023-03-31 11:55:36 -07:00
|
|
|
}}/>
|
2022-04-29 14:22:12 -07:00
|
|
|
|
|
|
|
## Template ([info][templates])
|
|
|
|
|
|
|
|
:::note default template
|
|
|
|
|
|
|
|
```template
|
|
|
|
{{ .PromptMark }}
|
|
|
|
```
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
[templates]: /docs/configuration/templates
|
|
|
|
[int-page]: https://iterm2.com/documentation-shell-integration.html
|