From 5fefe781aa75c8d2f78c04589421c538adf452cb Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 16 Jan 2008 13:40:38 +0100 Subject: [PATCH] zshrc: set $NAME in screen title only if $HOSTNAME is set --- debian/changelog | 1 + etc/zsh/zshrc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a391001..e5b6378 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ grml-etc-core (0.3.46) unstable; urgency=low [ Michael Prokop ] * zshrc: mention http://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code in weather() [thanks, gebi] + * zshrc: set $NAME in screen title only if $HOSTNAME is set -- Michael Prokop Fri, 11 Jan 2008 00:56:22 +0100 diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 89beb36..b57a7ee 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1005,7 +1005,7 @@ is4 && [[ -z $NOPRECMD ]] && \ preexec () { [[ -n $NOPRECMD ]] && return 0 # set hostname if not running on host with name 'grml' - if [[ "$HOSTNAME" != $(hostname) ]] ; then + if [[ -n "$HOSTNAME" ]] && [[ "$HOSTNAME" != $(hostname) ]] ; then NAME="@$HOSTNAME" fi # get the name of the program currently running and hostname of local machine -- 2.1.4