Skip to main content

iTerm

Whatโ€‹

Inserts iTerm2 shell integration prompt marks and extensions. This segment has no visible output but is used to enable iTerm2 terminal features. For more information, read the shell integration and extension page on the developer's website.

PromptMark in Bash and ZSH

You will need to add export ITERM2_SQUELCH_MARK=1 before the shell integration script is sourced.

PromptMark in 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:

function set_poshcontext
iterm2_prompt_mark
end

You do not need to add this segment to use the prompt mark.

Sample Configurationโ€‹

{
"type": "iterm",
"interactive": true,
"style": "plain",
"foreground": "#80ffea",
"template": "{{ .PromptMark }}"
}

Template (info)โ€‹

default template
{{ .PromptMark }}

Propertiesโ€‹

NameTypeDescription
.PromptMarkstringinserts the prompt mark to enable shell integration
.CurrentDirstringinserts the current directory
.RemoteHoststringinserts the current user and host name