From 374a4570d22d4300d89a6a43540f50ada586aa72 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 16 Dec 2007 20:34:40 +0100 Subject: [PATCH] /etc/zsh/zshrc: change logic of $HOSTNAME in preexec() --- debian/changelog | 8 ++++++++ etc/zsh/zshrc | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1cee470..185b854 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +grml-etc-core (0.3.43) unstable; urgency=low + + * /etc/zsh/zshrc: change logic of $HOSTNAME in preexec(): show + $HOSTNAME only when running the command on *another* box (being + a system != localhost). + + -- Michael Prokop Sun, 16 Dec 2007 20:33:52 +0100 + grml-etc-core (0.3.42) unstable; urgency=low [ Frank Terbeck ] diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index fd75bbc..7ca68cf 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -850,9 +850,8 @@ is4 && [[ -z $NOPRECMD ]] && \ preexec () { [[ -n $NOPRECMD ]] && return 0 # set hostname if not running on host with name 'grml' - local HOSTNAME=$(hostname) - if [[ "$HOSTNAME" != grml ]] ; then - NAME="@$HOSTNAME" + if [[ "$HOSTNAME" != $(hostname) ]] ; then + NAME="@$HOSTNAME" fi # get the name of the program currently running and hostname of local machine # set screen window title if running in a screen -- 2.1.4