Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bash Profile
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
[ -x "/Applications/" ] && alias vim=/Applications/
alias slime='open -a /Applications/Sublime\'
function parse_git_branch {
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
#PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s)") \$ "
# Non shitty terminal colors and awesome prompt
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PS1="\[\033[0;32m\]\u@\h\[\033[00;32m\] \[\033[01;34m\]\w \[\033[31m\]\$(__git_ps1)\[\033[00m\]$\[\033[00m\] "
export TITLE="\[\e]0;\h:\w\a\]"
function git_current_branch() {
git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///'
function git_current_origin() {
git config --get remote.origin.url | sed -e 's/^.*\://' | sed -e 's/\.git.*//'
alias gpr='open "$(git_current_origin)/pull/new/$(git_current_branch)"'
alias gpthis='git push origin HEAD:$(git_current_branch)'
alias gs='git status -sb'
alias mdbstart="mongod run --config /usr/local/Cellar/mongodb/2.0.1-x86_64/mongod.conf"
alias rmpyc='find . -name "*.pyc" -exec rm -rf {} \;'
alias gcompare='open "$(git_current_origin)/compare/$(git_ref_origin)...$(git_ref_head)"'
alias gopen='open "$(git_current_origin)"'
alias gitdiff='git log -p --color-words'
# startup virtualenv-burrito
if [ -f $HOME/.venvburrito/ ]; then
. $HOME/.venvburrito/
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
if which ruby >/dev/null && which gem >/dev/null; then
PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
export PATH=/usr/local/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment