Skip to content

Instantly share code, notes, and snippets.

@richleland
Created February 6, 2012 16:55
Show Gist options
  • Select an option

  • Save richleland/1753290 to your computer and use it in GitHub Desktop.

Select an option

Save richleland/1753290 to your computer and use it in GitHub Desktop.
# ADD THE CONTENTS OF THIS FILE TO ~/.bashrc OR COPY IT TO YOUR HOME FOLDER
# AND ADD THE FOLLOWING LINE TO ~/.bashrc:
# source ~/bash_dds
# AFTERWARDS EITHER RESTART TERMINAL OR RUN "source ~/.bashrc"
# add homebrew and homebrew-installed python to PATH
export PATH="/usr/local/sbin:/usr/local/bin:/usr/local/share/python:$PATH"
# pip bash completion
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
# virtualenv settings
export WORKON_HOME=$HOME/.virtualenvs
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# account for homebrew installed python
if [ -e "/usr/local/share/python/virtualenvwrapper.sh" ]
then source /usr/local/share/python/virtualenvwrapper.sh
else source /usr/local/bin/virtualenvwrapper.sh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment