Skip to content

Instantly share code, notes, and snippets.

@cdwilson
Created September 12, 2010 22:58
Show Gist options
  • Save cdwilson/576578 to your computer and use it in GitHub Desktop.
Save cdwilson/576578 to your computer and use it in GitHub Desktop.
My .profile
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
alias la="ls -a" # list all, includes dot files
alias ll="ls -l" # long list, excludes dot files
alias lla="ls -la" # long list all, includes dot files
# Setup some colors to use later in interactive shell or scripts
export COLOR_NC="\033[0m" # No Color
export COLOR_BLACK="\033[0;30m"
export COLOR_LIGHT_BLACK="\033[1;30m"
export COLOR_RED="\033[0;31m"
export COLOR_LIGHT_RED="\033[1;31m"
export COLOR_GREEN="\033[0;32m"
export COLOR_LIGHT_GREEN="\033[1;32m"
export COLOR_YELLOW="\033[0;33m"
export COLOR_LIGHT_YELLOW="\033[1;33m"
export COLOR_BLUE="\033[0;34m"
export COLOR_LIGHT_BLUE="\033[1;34m"
export COLOR_MAGENTA="\033[0;35m"
export COLOR_LIGHT_MAGENTA="\033[1;35m"
export COLOR_CYAN="\033[0;36m"
export COLOR_LIGHT_CYAN="\033[1;36m"
export COLOR_WHITE="\033[0;37m"
export COLOR_LIGHT_WHITE="\033[1;37m"
export EDITOR='/usr/bin/mate -w'
export LC_CTYPE=en_US.UTF-8
export RUBYOPT='rubygems'
export CLICOLOR=1
export GREP_OPTIONS='--color=auto'
export LS_OPTIONS='--color=auto'
# http://www.geekology.co.za/blog/2009/04/enabling-bash-terminal-directory-file-color-highlighting-mac-os-x/
# export LSCOLORS=ExFxCxDxBxegedabagacad
# Erase history duplicates
export HISTCONTROL=erasedups
# resize history size
export HISTSIZE=5000
# append to bash_history if Terminal.app quits
shopt -s histappend
# git-completion.bash
export GIT_PS1_SHOWDIRTYSTATE=1 #... untagged(*) and staged(+) changes
export GIT_PS1_SHOWSTASHSTATE=1 #... if something is stashed($)
export GIT_PS1_SHOWUNTRACKEDFILES=1 #... untracked files(%)
export GIT_PS1_SHOWUPSTREAM="auto"
# export PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
# export PS1='\e[1;30m\u@\h\e[0m \e[33m\w\e[0m $(__git_ps1 "(\e[31m%s\e[0m)")\n$ '
export PS1='\e[32m\u@\h\e[0m \e[33m\w\e[0m $(__git_ps1 "(\e[34m%s\e[0m)" | sed -e "s/\([=]\)/\e[32m\1\e[m/g" -e "s/\([*+%$<>]\)/\e[31m\1\e[m/g")\n$ '
# coreutils
# If you want to use the GNU tools by default
# export PATH=/opt/local/libexec/gnubin/:$PATH
# MacPorts Installer addition on 2011-09-25_at_16:19:49: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# MacTEX http://www.tug.org/mactex/multipletexdistributions.html
export PATH=/usr/texbin:$PATH
# rvm
[[ -s "/Users/cwilson/.rvm/scripts/rvm" ]] && source "/Users/cwilson/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Stow
export PATH=$HOME/stow/bin:$HOME/stow/sbin:/stow/bin:/stow/sbin:$PATH
# export DYLD_LIBRARY_PATH=$HOME/stow/lib:/stow/lib:/opt/local/lib:$DYLD_LIBRARY_PATH
# user paths
export PATH=$HOME/bin:$PATH
export MANPATH=$HOME/share/man:$MANPATH
# pip bash completion start
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
# pip bash completion end
# virtualenv
export WORKON_HOME=$HOME/.virtualenvs
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_REQUIRE_VIRTUALENV=true
[[ -s "/usr/local/bin/virtualenvwrapper.sh" ]] && source "/usr/local/bin/virtualenvwrapper.sh"
alias v=workon
alias v.deactivate=deactivate
alias v.mk='mkvirtualenv --distribute'
alias v.mk_withsetuptools='mkvirtualenv'
alias v.mk_withsitepackages='mkvirtualenv --system-site-packages'
alias v.rm=rmvirtualenv
alias v.switch=workon
alias v.add2virtualenv=add2virtualenv
alias v.cdsitepackages=cdsitepackages
alias v.cd=cdvirtualenv
alias v.lssitepackages=lssitepackages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment