From 87eac7da38591a149e32e912d07e32aff2806e35 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Mon, 23 Feb 2009 00:07:17 +0100 Subject: [PATCH] Clean up pre{exec,cmd} --- etc/zsh/zshrc | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 61e86e5..bdef972 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1955,21 +1955,17 @@ is4 && [[ $NOPRECMD -eq 0 ]] && precmd () { # update VCS information vcs_info - # allow manual overwriting of RPROMPT - if [[ -n $RPROMPT ]] ; then - [[ $TERM == screen* ]] && print -nP "\ekzsh\e\\" - # return 0 + if [[ $TERM == screen* ]] ; then + print -nP "\ekzsh\e\\" fi # just use DONTSETRPROMPT=1 to be able to overwrite RPROMPT if [[ $DONTSETRPROMPT -eq 0 ]] ; then if [[ $BATTERY -gt 0 ]] ; then - # update BATTERY information + # update battery (dropped into $PERCENT) information battery - RPROMPT="%(?..:()% ${PERCENT}${SCREENTITLE}" - # RPROMPT="${PERCENT}${SCREENTITLE}" + RPROMPT="%(?..:() ${PERCENT}" else - RPROMPT="%(?..:()% ${SCREENTITLE}" - # RPROMPT="${SCREENTITLE}" + RPROMPT="%(?..:() " fi fi # adjust title of xterm @@ -1996,12 +1992,6 @@ preexec () { local CMD="${1[(wr)^(*=*|sudo|ssh|-*)]}$NAME" # use hostname echo -ne "\ek$CMD\e\\" fi -# set the screen title to "zsh" when sitting at the command prompt: - if [[ "$TERM" == screen* ]] ; then - SCREENTITLE=$'%{\ekzsh\e\\%}' - else - SCREENTITLE='' - fi # adjust title of xterm case $TERM in (xterm*|rxvt) -- 2.1.4