Skip to content

Instantly share code, notes, and snippets.

@jgautsch
Last active August 29, 2015 13:56
Show Gist options
  • Save jgautsch/8949641 to your computer and use it in GitHub Desktop.
Save jgautsch/8949641 to your computer and use it in GitHub Desktop.
partial bashrc
# Turn on advanced bash completion if the file exists
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
# Locate virtualenvwrapper binary
if [ -f ~/.local/bin/virtualenvwrapper.sh ]; then
export VENVWRAP=~/.local/bin/virtualenvwrapper.sh
fi
if [ ! -z $VENVWRAP ]; then
# virtualenvwrapper ------------------------------------------
# make sure env directory exists; else create it
[ -d $HOME/sites/env ] || mkdir -p $HOME/sites/env
export WORKON_HOME=$HOME/sites/env
source $VENVWRAP
# virtualenv -------------------------------------------------
export VIRTUALENV_USE_DISTRIBUTE=true
# pip --------------------------------------------------------
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_REQUIRE_VIRTUALENV=true
export PIP_RESPECT_VIRTUALENV=true
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
### git branch showing in prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="\$LIGHT_GRAY\$(parse_git_branch)\$LIGHT_GRAY$ "
PS2='$ '
PS4='+ '
}
proml
alias c='clear'
alias serve='python -m SimpleHTTPServer'
export PATH="./bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment