Skip to content

Instantly share code, notes, and snippets.

Created June 15, 2011 08:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
My bash profile
# bash history (see:
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
export PATH=$PATH:/usr/local/mysql/bin/
# For mysql gem install. See:
export ARCHFLAGS="-arch i386"
# Aliases
alias reload='. ~/.bash_profile' # Run this alias to make shell pick up changes to this file
alias mop='top -o rsize'
alias flushdns='dscacheutil -flushcache'
alias lock='/System/Library/CoreServices/"Menu Extras"/ -suspend'
alias rubytest='ruby -I.:lib:test -rubygems' # e.g. $rubytest path/to/test.rb -n '/test name/'
# git
export GIT_EDITOR="mate -w"
# Tab completion for git
source /usr/local/git/contrib/completion/git-completion.bash
# Tab completion of known hosts
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh
# Tab completion for sudo
complete -c -f command sudo
# Prompt
PS1="\$(__git_ps1) $PS1" # Git branch
PS1="\$(~/.rvm/bin/rvm-prompt i v g)$PS1" # RVM ruby
[[ -s "/Users/james/.rvm/scripts/rvm" ]] && source "/Users/james/.rvm/scripts/rvm" # This loads RVM into a shell session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment