Created
September 8, 2015 15:41
-
-
Save levicole/0e97cf7d2fbdfc001f5b 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
| if [ -f ~/.bashrc ]; then | |
| source ~/.bashrc | |
| fi |
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
| export CLICOLOR=1 | |
| export LSCOLORS=gxgxcxdxbxegedabagacad | |
| export CLICOLOR LSCOLORS | |
| function parse_git_deleted { | |
| [[ $(git status 2> /dev/null | grep deleted:) != "" ]] && echo "-" | |
| } | |
| function parse_git_added { | |
| [[ $(git status 2> /dev/null | grep "Untracked files:") != "" ]] && echo '+' | |
| } | |
| function parse_git_modified { | |
| [[ $(git status 2> /dev/null | grep modified:) != "" ]] && echo "*" | |
| } | |
| function parse_git_dirty { | |
| echo "$(parse_git_added)$(parse_git_modified)$(parse_git_deleted)" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/<\1$(parse_git_dirty)>/" | |
| } | |
| LONG_PS1="\033[1;35m\]\W\e[0;33m\](\$(rvm-prompt))\033[0;34m\]\$(parse_git_branch)\[\033[00m\] $ " | |
| MEDIUM_PS1='\[\033[1;35m\]\W\[\033[0;34m\]$(parse_git_branch)\[\033[00m\] $ ' | |
| SHORT_PS1="$(parse_git_dirty) $ " | |
| export PS1=$MEDIUM_PS1 | |
| alias gpr='git pull --rebase' | |
| alias gd='git diff' | |
| alias gdc='git diff --cached' | |
| alias gst='git status' | |
| if [ -f `brew --prefix`/etc/bash_completion ]; then | |
| . `brew --prefix`/etc/bash_completion | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install: