From 37cafe9ce9405294771399dd8d81f1e97d70e791 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 22 Apr 2007 18:56:08 +0200 Subject: [PATCH] /etc/zsh/zshrc: improve code for manual overriding of RPROMPT --- debian/changelog | 4 ++-- etc/zsh/zshrc | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index fecfc7f..47650ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ grml-etc-core (0.2.49) unstable; urgency=low - * /etc/zsh/zshrc: restore old behaviour of RPROMPT, the 'allow - manual overriding of RPROMPT' is just too broken currently. + * /etc/zsh/zshrc: improve code for 'manual overriding of RPROMPT' + [thanks for helping, ft!] -- Michael Prokop Sun, 22 Apr 2007 18:37:27 +0200 diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index db667dd..9f5b88e 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -449,7 +449,10 @@ fi is4 && [[ -z $NOPRECMD ]] && precmd () { [[ -n $NOPRECMD ]] && return 0 # allow manual overwriting of RPROMPT - # [[ -n $RPROMPT ]] && 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 -- 2.1.4