From 060f34c7e5937444777170e08707d4f50b043b25 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 8 Jul 2012 17:26:33 -0400 Subject: [PATCH] [Fix #215] Set Terminal title on Mac OS X 10.8 --- modules/terminal/init.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index d0bab0b7..b87f51d5 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -82,13 +82,13 @@ function set-title-precmd { if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then # Set the current working directory in Apple Terminal. printf '\e]7;%s\a' "file://$HOST${PWD// /%20}" - else - set-window-title "${(%):-%~}" - for kind in tab screen; do - # Left-truncate the current working directory to 15 characters. - set-${kind}-title "${(%):-%15<...<%~%<<}" - done fi + + set-window-title "${(%):-%~}" + for kind in tab screen; do + # Left-truncate the current working directory to 15 characters. + set-${kind}-title "${(%):-%15<...<%~%<<}" + done fi } add-zsh-hook precmd set-title-precmd