append to ~/.bashrc:
# git branch in terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
export PS1="\[\e]0;\u@\h: \w\a\]\[\033[01;34m\]\w\[\033[00m\]:\033[01;32m\]\$(parse_git_branch)\[\033[00m\]$ "
------------
Add this to /env/bin/activate befoe export PS1
PS1="env,$_OLD_VIRTUAL_PS1"
Comments
Post a Comment