--- a/.bash_prompt Sun Jan 02 17:08:25 2011 +0800
+++ b/.bash_prompt Sun Jan 02 17:15:23 2011 +0800
local PROMPT_TEMPLATE="$P{branch|quiet}@{rev}{$R{update}}{$G+{rev|merge}}$R{status|modified}"
if [[ ${EUID} == 0 ]] ; then
+ local PROMPT_COLOR="$R"
# getting hg info is disabled for root
+ local PROMPT_COLOR="$G"
# testing if current dir is a part of hg repo
- [[ -d $TEST_DIR/.hg ]] && local TRACKED=1 && break
- [[ $TEST_DIR == '/' ]] && break
+ [[ -d "$TEST_DIR/.hg" ]] && local TRACKED=1 && break
+ [[ "$TEST_DIR" == '/' ]] && break
TEST_DIR=$(dirname "$TEST_DIR")
- if [[ $TRACKED ]] ; then
+ if [[ "$TRACKED" ]] ; then
local MISC_INFO=" $(hg prompt $PROMPT_TEMPLATE)"