From 8f89d4d5a5d584bae288d8111d83a6489a1369dc Mon Sep 17 00:00:00 2001 From: Darren Clark Date: Fri, 27 Jan 2012 01:20:06 -0700 Subject: Fixed Mac OS X Terminal.app related issue with extra newlines being printed out sometimes --- lib/termsupport.zsh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/termsupport.zsh') 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) -- cgit v1.2.3-70-g09d2 From 43bd46b780cdf60b318f452e40b893ae18e77c41 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 3 Oct 2012 17:18:14 +0200 Subject: fix title setting bug in xterm and urxvt Before this patch, commands containing %-signs set the title wrong (urxvt and xterm) [1] and produce strange output in urxvt [2]. test for bug 1: > sleep 10 && echo % sets title to "sleep 10 && echo %<<" > sleep 10 && echo %f doesn't change the title at all test for bug 2 (only urxvt): > echo %f 39m%f ^^^^^----- output --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/termsupport.zsh') diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e26fef6d3..4701e46c5 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -27,7 +27,7 @@ function omz_termsupport_preexec { emulate -L zsh setopt extended_glob local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd - title "$CMD" "%100>...>$2%<<" + title "$CMD" "%100>...>${2:gs/%/%%}%<<" } autoload -U add-zsh-hook -- cgit v1.2.3-70-g09d2 From fe094712fb0c896eeec55b686807011226bc9208 Mon Sep 17 00:00:00 2001 From: Trae Robrock Date: Tue, 20 Dec 2011 18:15:19 -0800 Subject: resolving conflict in termsupport plugin --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/termsupport.zsh') diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 4701e46c5..c056989eb 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -26,7 +26,7 @@ function omz_termsupport_precmd { function omz_termsupport_preexec { emulate -L zsh setopt extended_glob - local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd + local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd title "$CMD" "%100>...>${2:gs/%/%%}%<<" } -- cgit v1.2.3-70-g09d2 From c5ecb4e13691404a4555dbf6fa72fe411d463ad9 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 31 Dec 2012 05:25:07 -0800 Subject: Fixes #1489 Revert "Fixed Mac OS X Terminal.app related issue with extra newlines being printed out sometimes" This reverts commit 8f89d4d5a5d584bae288d8111d83a6489a1369dc. --- lib/termsupport.zsh | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/termsupport.zsh') diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 7470110b6..c056989eb 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -8,8 +8,6 @@ function title { fi 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) -- cgit v1.2.3-70-g09d2