Created
May 27, 2012 02:06
-
-
Save erbmicha/2795940 to your computer and use it in GitHub Desktop.
My .bashrc file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ALIASES | |
alias gitl="git log --oneline --decorate" | |
alias gits="git status -sb" | |
alias gu="git-up" | |
alias flushdns="dscacheutil -flushcache" | |
alias removesvn="find . -name .svn -print0 | xargs -0 rm -rf" | |
alias restartfinder="killall Finder && open /System/Library/CoreServices/Finder.app" | |
alias rrr="QUEUE=report_queue bundle exec rake environment resque:work" | |
alias ll="ls -alG" | |
alias show_library="chflags nohidden ~/Library/" | |
# FUNCTIONS | |
function gitrm { | |
git status | grep deleted | awk '{print $3}' | xargs git rm | |
} | |
source ~/.git_completion.sh | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
# EXPORTS | |
export ARCHFLAGS="-arch x86_64" | |
export LC_CTYPE=en_US.UTF-8 | |
export PS1='\h:\W$(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[0;33m\]$(parse_git_dirty)\[\e[0m\]]")$ ' | |
export PS1="\[\033[G\]$PS1" | |
export PATH=~/bin:$PATH | |
# RVM | |
alias rubydo="rvm rubydo" | |
alias multiruby="rvm rubydo" | |
[[ -s "/Users/erb/.rvm/scripts/rvm" ]] && source "/Users/erb/.rvm/scripts/rvm" | |
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment