zshrc: set $NAME in screen title only if $HOSTNAME is set
authorMichael Prokop <mika@grml.org>
Wed, 16 Jan 2008 12:40:38 +0000 (13:40 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 16 Jan 2008 12:40:38 +0000 (13:40 +0100)
debian/changelog
etc/zsh/zshrc

index a391001..e5b6378 100644 (file)
@@ -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 <mika@grml.org>  Fri, 11 Jan 2008 00:56:22 +0100
 
index 89beb36..b57a7ee 100644 (file)
@@ -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