From: Simon Ruderich Date: Mon, 21 Jun 2010 12:54:03 +0000 (+0200) Subject: zsh/rc: Prevent error when running on a different TERM. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=ab61f4e2ef413cec09f17ece30741af4526c4fdb;p=config%2Fdotfiles.git 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. --- 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