Skip to content

Instantly share code, notes, and snippets.

@sergeynikiforov
Created March 8, 2017 09:50
Show Gist options
  • Save sergeynikiforov/757eac638c5103a99c31b60a0367293e to your computer and use it in GitHub Desktop.
Save sergeynikiforov/757eac638c5103a99c31b60a0367293e to your computer and use it in GitHub Desktop.
# Set CLICOLOR if you want Ansi Colors in iTerm2
export CLICOLOR=1
# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color
# Customize terminal prompt
# export PS1="\u \W $ "
# virtualenv prompt
function virtualenv_info(){
# Get Virtual Env
if [[ -n "$VIRTUAL_ENV" ]]; then
# Strip out the path and just leave the env name
venv="${VIRTUAL_ENV##*/}"
else
# In case you don't have one activated
venv=''
fi
[[ -n "$venv" ]] && echo "($venv) "
}
# disable the default virtualenv prompt change
export VIRTUAL_ENV_DISABLE_PROMPT=1
VENV="\$(virtualenv_info)";
PROMPT_COMMAND='__git_ps1 $VENV"\u \W" " \\\$ "'
# git-prompt
source ~/.git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWCOLORHINTS=1
# colors!
green="\[\033[0;32m\]"
blue="\[\033[0;34m\]"
purple="\[\033[0;35m\]"
reset="\[\033[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment