--- a/.bash_prompt Fri May 27 21:39:33 2011 +0900
+++ b/.bash_prompt Wed Jul 27 22:10:28 2011 +0800
- local PROMPT_TEMPLATE="$P{branch|quiet}@{rev}{$R{update}}{$G+{rev|merge}}$R{status|modified}"
+ local PROMPT_TEMPLATE="${P}{branch|quiet}@{rev}{$R{update}}{$G+{rev|merge}}$R{status|modified}${RESET}"
+ local TIME="${G}\t${RESET}"
if [[ ${EUID} == 0 ]] ; then
# getting hg info is disabled for root
+ local HG_INFO=" ${P}-${RESET}"
if [[ "$TRACKED" ]] ; then
- local MISC_INFO=" $(hg prompt $PROMPT_TEMPLATE)"
+ local HG_INFO=" $(hg prompt $PROMPT_TEMPLATE)"
+ if [[ "$VIRTUAL_ENV" ]] ; then
+ local VENV="${G}+"$(basename "$VIRTUAL_ENV")"${RESET}"
if [[ "$RETURN_CODE" != 0 ]] ; then
- local PROMPT_PREFIX="$R${RETURN_CODE} "
+ local RETCODE="${R}${RETURN_CODE}${RESET} "
-${BOLD}[$G\t ${RESET}\u@\h \
-${PROMPT_PREFIX}${RESET}\W${MISC_INFO}${RESET}${BOLD}]\
+${RETCODE}\W${VENV}${HG_INFO}${BOLD}]\
${PROMPT_COLOR}\\\$${RESET} "