summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2008-02-27 12:12:13 +0100
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:21 +0100
commitfc0eb3494c79fa15f573c7358bdc51d073b7b89b (patch)
tree361888e2e68d2e192a8c704fb031ef602b4b72a5
parent1d4b4d81cc418ac7a160bba8d79411e9af765dbe (diff)
Utilisation du '@' dans le 'login@hostname' pour afficher le courrier reçu.
-rw-r--r--11_Prompts.zsh8
1 files changed, 5 insertions, 3 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh
index 603e51f..0282b21 100644
--- a/11_Prompts.zsh
+++ b/11_Prompts.zsh
@@ -41,6 +41,7 @@ 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
@@ -93,7 +94,8 @@ precmd ()
errorsize=4
# Mailcheck
- MAILSTAT="`[ -s ~/.procmail/procmail.log ] && < ~/.procmail/procmail.log awk 'BEGIN {RS="From" ; HAM=-1} !/JUNK/ { HAM++ } END { if (HAM > 0) { print "@" } }'`"
+ 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}
## SVN TRACKING ##
@@ -116,7 +118,7 @@ precmd ()
#
# -ERR------------------------git-svn-[ date ]-
#
- spaceleft=$(($COLUMNS - ${#MAILSTAT} - 1 - ${errorsize} - ${#SVNREV} -3- ${datesize} -3))
+ spaceleft=$(($COLUMNS - ${errorsize} - ${#SVNREV} -3- ${datesize} -3))
unset HBAR
for h in {1..$(($spaceleft - 1))}
@@ -139,7 +141,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"-"$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"-
+ 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"-
"$C_$COLOR_USER$_C"%n"$C_$COLOR_AROB$_C"@"$C_$COLOR_HOST$_C"%m $CURDIR$GITBRANCH "$C_$COLOR_DIES$_C"%#"$C_$COLOR_CMD$_C" "