From 894b1cadaf906f8036dcb2bb7142006174e976f6 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 14 Jul 2011 17:23:17 -0400 Subject: [PATCH] Moved the setting of GNU Screen window number. --- functions/appearance.zsh | 7 ------- functions/terminal.zsh | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/functions/appearance.zsh b/functions/appearance.zsh index 2596013b..277274d8 100644 --- a/functions/appearance.zsh +++ b/functions/appearance.zsh @@ -2,13 +2,6 @@ autoload -U colors colors -i -# Set the GNU Screen window number. -if [[ -n "$WINDOW" ]]; then - SCREEN_NO="%B$WINDOW%b " -else - SCREEN_NO="" -fi - # Set the default prompt theme. PS1="%n@%m:%~%# " diff --git a/functions/terminal.zsh b/functions/terminal.zsh index 5c1c812d..e75137ab 100644 --- a/functions/terminal.zsh +++ b/functions/terminal.zsh @@ -3,6 +3,13 @@ if [[ "$TERM" == 'dumb' ]]; then return fi +# Set the GNU Screen window number. +if [[ -n "$WINDOW" ]]; then + SCREEN_NO="%B$WINDOW%b " +else + SCREEN_NO="" +fi + # Fully supports GNU Screen, iTerm, and most modern xterm and rxvt terminals. # Partially supports Mac OS X Terminal since it can't set window and tab separately. # Usage: title "tab title" "window title" @@ -37,4 +44,3 @@ function preexec { local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} title "$CMD" "%100>...>$2%<<" } -