Permalink
Browse files

Make the prompt more magical, updating the current project status wit…

…h every command so I stay current
  • Loading branch information...
1 parent 4f7c008 commit aac6c98fbb51b305528cbe8d89332fc1077b42fb @Whiteknight committed Dec 13, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 addons/projects.sh
View
@@ -9,11 +9,11 @@ function cdl {
# Update the prompt used when we change branch/version
function __update_version {
- local WKPGVERSION=$(perl $WKPROJECTS/utils/get_version.pl)
+ local WKPGVERSION=""
WKPGPROJECT=${WKPGPROJECT:-$(pwd)}
local WKPGTYPE=""
- [ -e ".svn" ] && WKPGTYPE="svn:"
- [ -e ".git" ] && WKPGTYPE="git:"
+ [ -e ".svn" ] && WKPGTYPE="svn:" && WKPGVERSION=$(perl $WKPROJECTS/utils/get_version.pl)
+ [ -e ".git" ] && WKPGTYPE="git:" && WKPGVERSION="\$(git branch | grep '^* ' | sed 's/* //')"
PS1="\n<$WKPGPROJECT $WKPGTYPE$WKPGVERSION> "
return 0
}

0 comments on commit aac6c98

Please sign in to comment.