Anton Shestakov <engored@ya.ru>, Mon, 21 Nov 2011 15:31:47 +0800
Added .bash_aliases.
.bash_prompt
Permissions: -rw-r--r--
function prompt_command
{ 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}" # testing if current dir is a part of hg repo [[ -d
"$TEST_DIR/.hg" ]] && local TRACKED=1 && break [[ "$TEST_DIR" == '/' ]] && break TEST_DIR=$(dirname
"$TEST_DIR") if [[ "$TRACKED" ]] ; then local HG_INFO=" $(hg prompt
$PROMPT_TEMPLATE)" if [[ "$VIRTUAL_ENV" ]] ; then local VENV="${G}+"$(basename
"$VIRTUAL_ENV")"${RESET}" if [[ "$RETURN_CODE" !
= 0 ]] ; then local RETCODE="${R}${RETURN_CODE}${RESET} " ${RETCODE}\W${VENV}${HG_INFO}${BOLD}]\ ${PROMPT_COLOR}\\\$${RESET} " export PROMPT_COMMAND=prompt_command