Fix iterm integration for zsh prompt

This commit is contained in:
David Tomaschik
2026-07-13 15:55:34 -07:00
parent a9b68bfe1f
commit ba97442895

View File

@@ -132,7 +132,12 @@ case $TERM in
else else
# this will also work in tmux but is not what we want # this will also work in tmux but is not what we want
# Set the terminal title to include the command being run # Set the terminal title to include the command being run
print -Pn "\e]0;%n@%m: %~ ($cmd)\a" # Skip adding (cmd) in iTerm2 — shell integration already injects the job name
if [[ -z "$ITERM_SESSION_ID" ]]; then
print -Pn "\e]0;%n@%m: %~ ($cmd)\a"
else
print -Pn "\e]0;%n@%m: %~\a"
fi
fi fi
} }
# Add the hooks to zsh # Add the hooks to zsh