defensive prompt/logcheck, this should make bad programs play nice

This commit is contained in:
dave 2009-02-14 22:47:44 -06:00
parent ff49789f0a
commit 95d230ad64
2 changed files with 5 additions and 5 deletions

View file

@ -1,9 +1,9 @@
# prompt # prompt
if [ -z "${SSH_TTY}" ] ; then if [ -z "${SSH_TTY}" ] ; then
PROMPT=$'%{\e[01;32m%}%n@%m %{\e[01;34m%}%~ %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' PROMPT=$'%{\e[00;00m%}%{\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%}' RPROMPT=$'%{\e[00;00m%}%1(j.%{\e[00;36m%}[%j].)%{\e[01;33m%}[%t]%{\e[00;00m%}'
else else
PROMPT=$'%{\e[01;36m%}%n %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' PROMPT=$'%{\e[00;00m%}%{\e[01;36m%}%n %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}'
RPROMPT=$'%{\e[01;33m%}%m %{\e[01;32m%}%~%{\e[00;00m%}' RPROMPT=$'%{\e[00;00m%}%{\e[01;33m%}%m %{\e[01;32m%}%~%{\e[00;00m%}'
fi fi

2
zshrc
View file

@ -19,7 +19,7 @@ zle -N edit-command-line
# Keep track of other people accessing the box # Keep track of other people accessing the box
watch=( all ) watch=( all )
export LOGCHECK=30 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 # directory hashes
if [ -d "${HOME}/sandbox" ] ; then if [ -d "${HOME}/sandbox" ] ; then