diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-02-13 17:06:02 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-07 14:15:20 +0100 |
commit | 0c222f012106a0b93b8238444aa354a83c27d862 (patch) | |
tree | e18aa9b42a08fa13c232d747dd736007d31b8b37 | |
parent | bd3cdf892f6d387a7b517032b6a98638d99f781f (diff) |
=?utf-8?q?Mail=20status=20dans=20la=20barre=20d'info=20du=20prompt=20plut=C3=B4t=20que=20dans
-rw-r--r-- | 11_Prompts.zsh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh index 0fa593f..c014f77 100644 --- a/11_Prompts.zsh +++ b/11_Prompts.zsh @@ -91,6 +91,10 @@ precmd () ERROR=%(? "$C_$COLOR_BAR$_C----" "%4>>"$C_$COLOR_ERRR$_C"%?$C_$COLOR_BAR$_C"---"%>>") errorsize=4 + # Mailcheck + MAILSTAT="`[ -s ~/.procmail/procmail.log ] && < ~/.procmail/procmail.log awk 'BEGIN {RS="From" ; HAM=1} !/JUNK/ { HAM++ } END { if (HAM > 0) { print "-You got mail !-" } }'`" + + ## SVN TRACKING ## SVNREV=$(svn info 2>&- | grep '^Révision : ' | sed 's/^.* : /r/') if [ "$SVNREV" != "" ] @@ -111,7 +115,7 @@ precmd () # # -ERR------------------------git-svn-[ date ]- # - spaceleft=$(($COLUMNS - ${errorsize} - ${#SVNREV} - 3 - ${datesize} - 3)) + spaceleft=$(($COLUMNS - ${errorsize} - ${#MAILSTAT} - ${#SVNREV} - 3 - ${datesize} - 3)) unset HBAR for h in {1..$(($spaceleft - 1))} @@ -134,11 +138,9 @@ 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$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$MAILSTAT$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" " - # Mailcheck - [ -s ~/.procmail/procmail.log ] && < ~/.procmail/procmail.log awk 'BEGIN {RS="From" ; HAM=0} !/JUNK/ { HAM++ } END { if (HAM > 0) { print "You got mail !" } }' } |