1 export PATH=/usr/local/bin:/usr/local/sbin:$PATH
2 export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
5 export JAVA_HOME=$(/usr/libexec/java_home)
7 export TERM=screen-256color
10 function _set_git_envar_info() {
15 RVM_COMMAND=$(rvm-prompt)
16 if [[ $RVM_COMMAND == "" ]]
20 if [[ $(which git 2> /dev/null) ]]
23 STATUS=$(git status 2>/dev/null)
28 GIT_BRANCH="$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')"
29 if [[ -n "$GIT_BRANCH" ]]
33 if [[ "$STATUS" == *'working directory clean'* ]]
38 if [[ "$STATUS" == *'Changes to be committed:'* ]]
40 GIT_STATE='!' # Index has files staged for commit
42 if [[ "$STATUS" == *'Changed but not updated:'* ]]
44 GIT_STATE="?" # Working tree has files modified but unstaged
46 if [[ "$STATUS" == *'Untracked files:'* ]]
48 GIT_STATE='?' # Working tree has untracked files
54 export -f _set_git_envar_info
56 #this thing for my prompt.
57 export PROMPT_COMMAND="_set_git_envar_info"
58 export PS1='\[\e[0;31m\]\u\[\e[0m\] at \[\e[0;33m\]\h\[\e[0m\] in \[\e[0;32m\]\w\[\e[0m\]$GIT_PREFIX\[\e[1;34m\]$GIT_BRANCH\[\e[0m\]\[\e[0;32m\]$GIT_STATE \[\e[0;30m\]($RVM_COMMAND) \[\e[0m\] \n\$ '
60 #display fortune when I start
62 /usr/local/bin/fortune
70 alias dwarffortress="/Applications/Dwarf\ Fortress/df"
72 alias rspec="rspec --color"
75 alias gpsc="git push origin $GIT_BRANCH"
76 alias gplc="git pull origin $GIT_BRANCH"
78 #Enable Bash Completion
79 if [ -f `brew --prefix`/etc/bash_completion ]; then
80 . `brew --prefix`/etc/bash_completion
83 #Screeninator and RVM scripts
84 [[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm