summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-06-15 11:29:59 +0200
committerHugues Hiegel <hugues@hiegel.fr>2009-06-15 11:29:59 +0200
commita717a7a8c7fca53bddba8177e987af185c7fcdfb (patch)
tree19ca76f6204d58eae711e13e7c11a26d4d3c34a5
parent35985041247dc3e6bdbfcb9839ef8ecfe6299373 (diff)
[Prompt] Gets and show current CVS tag
-rw-r--r--12_Prompts.zsh12
1 files changed, 11 insertions, 1 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 68bcc5f..06c8611 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -227,6 +227,16 @@ update_prompt()
## Second line of prompt : don't let the path garbage the entire line
##
+ # get cvs tag
+ #
+ CVSTAG=""
+ [ "$DEBUG" = "yes" ] && echo -n " CVS status..."
+ if [ -d CVS ]
+ then
+ CVSTAG=$(cat CVS/Tag)
+ CVSTAG=${CVSTAG:+ $C_$prompt_colors[up_to_date]$_C$CVSTAG}
+ fi
+
# get svn status
#
[ "$DEBUG" = "yes" ] && echo -n " SVN status..."
@@ -298,7 +308,7 @@ redisplay_prompt ()
# 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="$AGENTS""$MAILSTAT""$ERROR""$BATTERY"$C_$prompt_colors[bar]$_C"$HBAR""$DATE
-"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"%m $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" "
+"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"%m $CURDIR$CVSTAG$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" "
}