From 95d230ad64342017c0ad53aaf841ffa10ab0cd31 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 14 Feb 2009 22:47:44 -0600 Subject: [PATCH] defensive prompt/logcheck, this should make bad programs play nice --- zsh/prompt | 8 ++++---- zshrc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zsh/prompt b/zsh/prompt index 5a1ab0b..ffd604b 100755 --- a/zsh/prompt +++ b/zsh/prompt @@ -1,9 +1,9 @@ # prompt if [ -z "${SSH_TTY}" ] ; then - PROMPT=$'%{\e[01;32m%}%n@%m %{\e[01;34m%}%~ %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' - RPROMPT=$'%1(j.%{\e[00;36m%}[%j].)%{\e[01;33m%}[%t]%{\e[00;00m%}' + PROMPT=$'%{\e[00;00m%}%{\e[01;32m%}%n@%m %{\e[01;34m%}%~ %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' + RPROMPT=$'%{\e[00;00m%}%1(j.%{\e[00;36m%}[%j].)%{\e[01;33m%}[%t]%{\e[00;00m%}' else - PROMPT=$'%{\e[01;36m%}%n %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' - RPROMPT=$'%{\e[01;33m%}%m %{\e[01;32m%}%~%{\e[00;00m%}' + PROMPT=$'%{\e[00;00m%}%{\e[01;36m%}%n %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' + RPROMPT=$'%{\e[00;00m%}%{\e[01;33m%}%m %{\e[01;32m%}%~%{\e[00;00m%}' fi diff --git a/zshrc b/zshrc index a1247e2..88a21a0 100644 --- a/zshrc +++ b/zshrc @@ -19,7 +19,7 @@ zle -N edit-command-line # Keep track of other people accessing the box watch=( all ) export LOGCHECK=30 -export WATCHFMT=$'\e[01;36m'" -- %n@%m has %(a.Logged In.Logged out) --"$'\e[00;00m' +export WATCHFMT=$'\e[00;00m\e[01;36m'" -- %n@%m has %(a.Logged In.Logged out) --"$'\e[00;00m' # directory hashes if [ -d "${HOME}/sandbox" ] ; then