From ab61f4e2ef413cec09f17ece30741af4526c4fdb Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 21 Jun 2010 14:54:03 +0200 Subject: [PATCH] zsh/rc: Prevent error when running on a different TERM. This happened because window_preexec() is only defined if TERM is screen*, xterm* or rxvt*. On other TERMs the call to window_preexec() in "RUN COMMANDS" failed. --- zsh/rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh/rc b/zsh/rc index b0da578..5e97bea 100644 --- a/zsh/rc +++ b/zsh/rc @@ -428,6 +428,10 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then # Add the preexec() and precmd() hooks. add-zsh-hook preexec window_preexec add-zsh-hook precmd window_precmd +else + # Fallback if another TERM is used, necessary to run screen (see below in + # "RUN COMMANDS"). + window_preexec() { } fi -- 2.45.2