From 8f89d4d5a5d584bae288d8111d83a6489a1369dc Mon Sep 17 00:00:00 2001 From: Darren Clark Date: Fri, 27 Jan 2012 01:20:06 -0700 Subject: [PATCH] Fixed Mac OS X Terminal.app related issue with extra newlines being printed out sometimes --- lib/termsupport.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 221989502..6601cbcb8 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -6,6 +6,8 @@ function title { [ "$DISABLE_AUTO_TITLE" != "true" ] || return if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars + elif [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then + print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)