color fix for light themes

pull/269/head
Fatih Kadir Akın 2014-02-19 15:45:23 +02:00
parent 3a2f98eab6
commit ec2245abb1
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
SCM_THEME_PROMPT_PREFIX="${cyan} at ${green}"
SCM_THEME_PROMPT_SUFFIX=""
SCM_THEME_PROMPT_DIRTY=" ${red}with changes"
SCM_THEME_PROMPT_CLEAN=""
venv() {
if [ ! -z "$VIRTUAL_ENV" ]
then
local env=$VIRTUAL_ENV
echo "${gray} on ${orange}${env##*/} "
fi
}
last_two_dirs() {
pwd|rev|awk -F / '{print $1,$2}'|rev|sed s_\ _/_|sed "s|$(sed 's,\/,,'<<<$HOME)|~|g"
}
prompt() {
PS1="${yellow}# ${reset_color}$(last_two_dirs)$(scm_prompt_info)${reset_color}$(venv)${reset_color} ${cyan}\n> ${reset_color}"
}
PROMPT_COMMAND=prompt