keep non conditional colors in the prompt builder

This commit is contained in:
nojhan 2012-07-19 11:17:40 +02:00
parent ba65cd24fd
commit fc2e64b7f0

View File

@ -391,11 +391,12 @@ __smart_mark()
fi fi
} }
# Display the return value of the last command, if different from zero
__return_value() __return_value()
{ {
if [ "$1" -ne "0" ] if [ "$1" -ne "0" ]
then then
echo -ne "${NO_COL}${PURPLE}$1${NO_COL}" echo -ne "$1"
fi fi
} }
@ -449,7 +450,7 @@ __set_bash_prompt()
else else
PS1="${PS1}[${LIGHT_YELLOW}\u${__HOST}${NO_COL}:${YELLOW}\w${NO_COL}]" PS1="${PS1}[${LIGHT_YELLOW}\u${__HOST}${NO_COL}:${YELLOW}\w${NO_COL}]"
fi fi
PS1="${PS1}${__RET}${__MARK}" PS1="${PS1}${PURPLE}${__RET}${NO_COL}${__MARK}"
# Glue the bash prompt always go to the first column . # Glue the bash prompt always go to the first column .
# Avoid glitches after interrupting a command with Ctrl-C # Avoid glitches after interrupting a command with Ctrl-C