source ~/.git-prompt.sh # aliases # ------------------------------ alias ls='ls -G' alias ll='ls -al' # colors # ------------------------------ ################## # Code # Color # ################## # 00 # Off # # 30 # Black # # 31 # Red # # 32 # Green # # 33 # Yellow # # 34 # Blue # # 35 # Magenta # # 36 # Cyan # # 37 # White # ################## # Dark colors: \[\033[0;??m\] # Light colors: \[\033[1;??m\] function color { echo "\[\033[$1;$2m\]" } c_prompt=`color 0 33` c_path=`color 1 33` c_branch=`color 1 32` c_tag=`color 1 34` c_off=`color 0 00` # git # ------------------------------ if [ -f ~/.git-prompt.bash ]; then source ~/.git-prompt.bash export PS1='[\W]$(__git_ps1 "(%s)"): ' fi function git_branch { __git_ps1 " %s" } function git_tag { tag=`git describe --exact-match --tags HEAD 2> /dev/null` [ -z "$tag" ] && return 1 echo " $tag" } # virtualenv # ------------------------------ source /usr/local/bin/virtualenvwrapper.sh # ps1 # ------------------------------ PS1="${c_prompt}[${c_path}\W$c_branch\$(git_branch)$c_tag\$(git_tag)${c_prompt}]${c_off} " # reset # ------------------------------ unset c_prompt c_path c_branch c_tag c_off