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โ
- json
- yaml
- toml
{
"type": "iterm",
"interactive": true,
"style": "plain",
"foreground": "#80ffea",
"template": "{{ .PromptMark }}"
}
type: iterm
interactive: true
style: plain
foreground: "#80ffea"
template: "{{ .PromptMark }}"
type = "iterm"
interactive = true
style = "plain"
foreground = "#80ffea"
template = "{{ .PromptMark }}"
Template (info)โ
default template
{{ .PromptMark }}
Propertiesโ
Name | Type | Description |
---|---|---|
.PromptMark | string | inserts the prompt mark to enable shell integration |
.CurrentDir | string | inserts the current directory |
.RemoteHost | string | inserts the current user and host name |