/etc/zsh/zshrc: improve code for manual overriding of RPROMPT
[grml-etc-core.git] / etc / zsh / zshrc
index 03c27d1..9f5b88e 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Apr 21 23:57:20 CEST 2007 [mika]
+# Latest change: Son Apr 22 18:37:24 CEST 2007 [mika]
 ################################################################################
 # This file is sourced only for interactive shells. It
 # should contain commands to set up aliases, functions,
@@ -449,7 +449,10 @@ fi
   is4 && [[ -z $NOPRECMD ]] && precmd () {
       [[ -n $NOPRECMD ]] && return 0
       # allow manual overwriting of RPROMPT
-      [[ -n $RPROMPT ]] && echo -n $'\ekzsh\e\\' && return 0
+      if [[ -n $RPROMPT ]] ; then
+         [[ $TERM == screen* ]] && echo -n $'\ekzsh\e\\'
+         return 0
+      fi
       # just use DONTSETRPROMPT=1 to be able to overwrite RPROMPT
       if [[ -z $DONTSETRPROMPT ]] ; then
          if [[ -n $BATTERY ]] ; then