From: Michael Prokop Date: Sat, 26 Nov 2011 15:04:35 +0000 (+0100) Subject: zshrc: check for empty DONTSETRPROMPT and NOTITLE X-Git-Tag: v0.4.02~1 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=2eb78fd32a353431bb8dcfe0c6169f3c74771190;p=grml-etc-core.git zshrc: check for empty DONTSETRPROMPT and NOTITLE --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 47ec759..0f6c36f 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1325,7 +1325,7 @@ is4 && [[ $NOPRECMD -eq 0 ]] && precmd () { fi fi # just use DONTSETRPROMPT=1 to be able to overwrite RPROMPT - if [[ $DONTSETRPROMPT -eq 0 ]] ; then + if [[ ${DONTSETRPROMPT:-} -eq 0 ]] ; then if [[ $BATTERY -gt 0 ]] ; then # update battery (dropped into $PERCENT) information battery @@ -1336,7 +1336,7 @@ is4 && [[ $NOPRECMD -eq 0 ]] && precmd () { fi # adjust title of xterm # see http://www.faqs.org/docs/Linux-mini/Xterm-Title.html - [[ ${NOTITLE} -gt 0 ]] && return 0 + [[ ${NOTITLE:-} -gt 0 ]] && return 0 case $TERM in (xterm*|rxvt*) set_title ${(%):-"%n@%m: %~"}