Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…h every command so I stay current
  • Loading branch information...
commit aac6c98fbb51b305528cbe8d89332fc1077b42fb 1 parent 4f7c008
Andrew Whitworth authored December 13, 2010

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  addons/projects.sh
6  addons/projects.sh
@@ -9,11 +9,11 @@ function cdl {
9 9
 
10 10
 # Update the prompt used when we change branch/version
11 11
 function __update_version {
12  
-    local WKPGVERSION=$(perl $WKPROJECTS/utils/get_version.pl)
  12
+    local WKPGVERSION=""
13 13
     WKPGPROJECT=${WKPGPROJECT:-$(pwd)}
14 14
     local WKPGTYPE=""
15  
-    [ -e ".svn" ] && WKPGTYPE="svn:"
16  
-    [ -e ".git" ] && WKPGTYPE="git:"
  15
+    [ -e ".svn" ] && WKPGTYPE="svn:" && WKPGVERSION=$(perl $WKPROJECTS/utils/get_version.pl)
  16
+    [ -e ".git" ] && WKPGTYPE="git:" && WKPGVERSION="\$(git branch | grep '^* ' | sed 's/* //')"
17 17
     PS1="\n<$WKPGPROJECT $WKPGTYPE$WKPGVERSION> "
18 18
     return 0
19 19
 }

0 notes on commit aac6c98

Please sign in to comment.
Something went wrong with that request. Please try again.