Created
May 5, 2014 17:06
-
-
Save gnuwilliam/552033a0dd5b0d3cbbe0 to your computer and use it in GitHub Desktop.
This file contains 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=GxFxCxDxBxegedabagaced | |
export LANG=pt_BR.UTF-8 | |
# shortcuts | |
alias gs="git status" | |
alias gd="git diff" | |
alias gc="git commit -a" | |
alias search="git grep" | |
alias mate="/Users/william/.rvm/rubies/ruby-2.1.0/bin/mate" | |
alias hpcgcc="/Users/william/hpc-gcc/bin/gcc" | |
# editors | |
export GIT_EDITOR=vim | |
export EDITOR="mate -w" | |
# custom options | |
export GREP_OPTIONS="--color=auto" | |
export GREP_COLOR="4;33" | |
export CLICOLOR="auto" | |
# user configuration | |
export PATH=${PATH}:/usr/local/bin | |
PATH=$PATH:/usr/local/sbin:/Users/william/Desktop/adt-bundle-mac-x86_64-20131030/sdk/tools/:/Users/william/Desktop/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/ | |
# rvm | |
# virtualenv | |
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python | |
source /usr/local/bin/virtualenvwrapper.sh | |
# git functions | |
function parse_git_deleted { | |
[[ $(git status --ignore-submodules 2> /dev/null | grep deleted:) != "" ]] && echo "-" | |
} | |
function parse_git_added { | |
[[ $(git status --ignore-submodules 2> /dev/null | grep "Untracked files:") != "" ]] && echo '+' | |
} | |
function parse_git_modified { | |
[[ $(git status --ignore-submodules 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))/" | |
} | |
function parse_ruby_version { | |
echo $RUBY_VERSION | sed -e "s/^ruby\-//" | |
} | |
# PS1 terminal | |
export PS1='\[\033[01;30m\]\W\[\033[01;32m\]$(parse_git_branch) $\[\033[00m\] ' | |
# rvm | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment