Skip to content

Instantly share code, notes, and snippets.

@dharhas
Created December 12, 2014 15:48
Show Gist options
  • Save dharhas/80bf790216c745659eee to your computer and use it in GitHub Desktop.
Save dharhas/80bf790216c745659eee to your computer and use it in GitHub Desktop.
bash profile for use with git-bash-prompt anaconda and virtualenv
# Python -------------
# Anaconda
alias anaconda='export PATH=/Users/dharhas/anaconda/bin:$PATH; alias workon="source activate"; alias deactivate="source deactivate"'
alias rma='deactivate; export PATH=`echo -n $PATH | awk -v RS=: -v ORS=: "/anaconda/ {next} {print}" | sed "s/:$//"`; unalias workon deactivate'
# Problem with anaconda gdal
export GDAL_DATA=/usr/local/share/gdal/
# Virtual Envs (for use with system python)
export WORKON_HOME=~/venvs
source virtualenvwrapper.sh
# --------------------
# Git ----------------
# gitprompt configuration
GIT_PROMPT_START='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]'
GIT_PROMPT_ONLY_IN_REPO=0
GIT_PROMPT_END='$ '
. ~/repos/bash-git-prompt/gitprompt.sh
export PATH=/usr/local/bin:$PATH
# --------------------
# Bash History Settings ----
export HISTCONTROL=ignoredups:erasedups #avoid dups
#append history entries ...
shopt -s histappend
alias u='history -n'
PROMPT_COMMAND="$PROMPT_COMMAND; history -a"
# --------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment