From a438b146fef1f3418f415949d3a9c74ca34a91d0 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sat, 5 May 2012 16:54:38 -0400 Subject: [PATCH] [Fix #163] Selectively set terminal title in preexec Apple Terminal will now reset the terminal title after a command has finished executing. --- modules/terminal/init.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index b7aaa24..a1a1623 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -102,7 +102,9 @@ add-zsh-hook precmd set-title-precmd # Sets the tab and window titles before command execution. function set-title-preexec { if zstyle -t ':omz:module:terminal' auto-title; then - set-title-by-command "$2" + if [[ "$TERM_PROGRAM" != 'Apple_Terminal' ]]; then + set-title-by-command "$2" + fi fi } add-zsh-hook preexec set-title-preexec