fc3f7d01ec3f

Fix the virtualenv prompt problem.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 21 Aug 2009 22:51:52 -0400
parents 31f1738d6406
children 02af70beae80
branches/tags (none)
files .bashrc

Changes

--- a/.bashrc	Fri Aug 21 17:41:15 2009 -0400
+++ b/.bashrc	Fri Aug 21 22:51:52 2009 -0400
@@ -61,7 +61,9 @@
 }
 
 render_ps1() {
-  echo "\n${PINK}\u ${D}at ${ORANGE}\h ${D}in ${GREEN}\w$(hg_ps1)${D}\n$ "
+  echo "\n\
+${PINK}\u ${D}at ${ORANGE}\h ${D}in ${GREEN}\w$(hg_ps1)${D}\n\
+$([ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' )$ "
 }
 
 PROMPT_COMMAND="$(echo "$PROMPT_COMMAND"|sed -e's/PS1="`render_ps1`";//g')"