/etc/zsh/zshrc: change logic of $HOSTNAME in preexec() 0.3.43
authorMichael Prokop <mika@grml.org>
Sun, 16 Dec 2007 19:34:40 +0000 (20:34 +0100)
committerMichael Prokop <mika@grml.org>
Sun, 16 Dec 2007 19:34:40 +0000 (20:34 +0100)
debian/changelog
etc/zsh/zshrc

index 1cee470..185b854 100644 (file)
@@ -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 <mika@grml.org>  Sun, 16 Dec 2007 20:33:52 +0100
+
 grml-etc-core (0.3.42) unstable; urgency=low
 
   [ Frank Terbeck ]
index fd75bbc..7ca68cf 100644 (file)
@@ -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