From ba97442895d63b438f7af850a653f831d10a6a89 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 13 Jul 2026 15:55:34 -0700 Subject: [PATCH] Fix iterm integration for zsh prompt --- dotfiles/zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index dd7a61f..49e82b7 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -132,7 +132,12 @@ case $TERM in else # this will also work in tmux but is not what we want # 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 } # Add the hooks to zsh