summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2008-02-28 10:32:00 +0100
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:21 +0100
commitfbf6922215d632c6a01fc6d954f9fd56d353d13e (patch)
treed92b04245c4e3bc51c79654abf230487d5f4be99
parentebfaa79728cb038205e8ccf58f818d77e08de8db (diff)
Revert "Utilisation du '@' dans le 'login@hostname' pour afficher le courrier reçu."
This reverts commit 9ea51f7c5e442f382db96162d333c272568f2cea.
-rw-r--r--11_Prompts.zsh8
1 files changed, 3 insertions, 5 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh
index e624328..7239b34 100644
--- a/11_Prompts.zsh
+++ b/11_Prompts.zsh
@@ -41,7 +41,6 @@ COLOR_DIES="0;$GENERIC"
COLOR_DOUBLEDOT="0;%(! $VOID $VOID)"
COLOR_PAREN="0;$CYAN"
COLOR_MAIL="0;$YELLOW;$BOLD"
-COLOR_NOMAIL=$COLOR_AROB
COLOR_BAR="0;$GENERIC;$BOLD"
COLOR_BRACES=$COLOR_BAR
@@ -94,8 +93,7 @@ precmd ()
errorsize=4
# Mailcheck
- COLOR_AROB="COLOR_` [ -s ~/.procmail/procmail.log ] && < ~/.procmail/procmail.log awk 'BEGIN {RS="From" ; HAM=-1} !/JUNK/ { HAM++ } END { if (HAM > 0) { printf "MAIL" } else { printf "NOMAIL" } }' || echo "NOMAIL" `"
- COLOR_AROB=${(P)COLOR_AROB}
+ MAILSTAT="`[ -s ~/.procmail/procmail.log ] && < ~/.procmail/procmail.log awk 'BEGIN {RS="From" ; HAM=-1} !/JUNK/ { HAM++ } END { if (HAM > 0) { print "@" } }'`"
## SVN TRACKING ##
@@ -118,7 +116,7 @@ precmd ()
#
# -ERR------------------------git-svn-[ date ]-
#
- spaceleft=$(($COLUMNS - ${errorsize} - ${#SVNREV} -3- ${datesize} -3))
+ spaceleft=$(($COLUMNS - ${#MAILSTAT} - 1 - ${errorsize} - ${#SVNREV} -3- ${datesize} -3))
unset HBAR
for h in {1..$(($spaceleft - 1))}
@@ -141,7 +139,7 @@ precmd ()
# Affiche l'user, l'host, le tty et le pwd. Rien que ça...
# Note que pour le pwd, on n'affiche que les 4 derniers dossiers pour éviter
# de pourrir le fenêtre de terminal avec un prompt à rallonge.
- PS1=$C_$COLOR_BAR$_C"-$ERROR"$C_$COLOR_BAR$_C"$HBAR"$C_$COLOR_SVN$_C"$SVNREV"$C_$COLOR_BAR$_C"-"$C_$COLOR_BRACES$_C"[ "$C_$COLOR_DATE$_C"$DATE"$C_$COLOR_BRACES$_C" ]"$C_$COLOR_BAR$_C"-
+ PS1=$C_$COLOR_BAR$_C"-"$C_$COLOR_MAIL$_C"$MAILSTAT"$C_$COLOR_BAR$_C"-$ERROR"$C_$COLOR_BAR$_C"$HBAR"$C_$COLOR_SVN$_C"$SVNREV"$C_$COLOR_BAR$_C"-"$C_$COLOR_BRACES$_C"[ "$C_$COLOR_DATE$_C"$DATE"$C_$COLOR_BRACES$_C" ]"$C_$COLOR_BAR$_C"-
"$C_$COLOR_USER$_C"%n"$C_$COLOR_AROB$_C"@"$C_$COLOR_HOST$_C"%m $CURDIR$GITBRANCH "$C_$COLOR_DIES$_C"%#"$C_$COLOR_CMD$_C" "