Last active
December 27, 2015 06:39
-
-
Save nickgartmann/7283554 to your computer and use it in GitHub Desktop.
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
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH" | |
source "/Users/nickgartmann/.rvm/scripts/rvm" | |
source "/Users/nickgartmann/.rvm/contrib/ps1_functions" | |
YELLOW="\[\033[3;33m\]" | |
PURPLE="\[\033[3;35m\]" | |
NO_COLOR="\[\033[0m\]" | |
RED="\[\033[3;31m\]" | |
GIT_DIRTY=$YELLOW | |
# origin of work http://henrik.nyh.se/2008/12/git-dirty-prompt | |
function parse_git_dirty { | |
[[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && tput setf 1 | |
} | |
function parse_git_branch { | |
if [ "$(git diff --shortstat 2> /dev/null | tail -n1)" == "" ] | |
then | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1)/" | |
else | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/($(tput setaf 1)\1$(tput sgr0))/" | |
fi | |
} | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
PS1="{$YELLOW$(date +%H:%M)$NO_COLOR}[$PURPLE\$(rvm-prompt i v g | sed s/ruby-// )$NO_COLOR]\W\$(parse_git_branch)» " | |
### Added by the Heroku Toolbelt | |
export PATH="/usr/local/heroku/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment