Created
July 12, 2011 16:46
-
-
Save guiceolin/1078393 to your computer and use it in GitHub Desktop.
bashrc
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
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;35m\]\w\[\033[00m\]' | |
#Binaries for Android Tools | |
PATH=${PATH}:~/Documents/android-sdk-mac_86/tools | |
#Binaries for RVM ( Ruby Virtual Machine ) | |
PATH=${PATH}:~/.rvm/bin | |
#Git completation on bash terminal | |
source ~/.git-completion.bash | |
#Git status on PS1 | |
function __repo_branch () | |
{ | |
__git_ps1 | |
} | |
function __repo_dirty () | |
{ | |
# Search for .git-prompt-disable file in parent directories | |
dir=`pwd` | |
while [ `dirname "$dir"` != "$dir" ] ; do | |
if [ -f "$dir/.git-prompt-disable" ] ; then perl -e 'print "? "' ; return ; fi | |
dir=`dirname "$dir"` | |
done | |
git status 2>&1 | grep "Not a git repository" > /dev/null && return | |
git status 2>/dev/null | grep "working directory clean" >/dev/null || perl -e 'print "* "' | |
} | |
#Final PS1 output | |
PS1="$PS1\[\033[00m\]\[\033[01;33m\]\$(__repo_branch)\[\033[01;31m\]\$(__repo_dirty)\[\033[00m\]\$ " | |
#Export the path variable. | |
export PATH=${PATH} | |
#Configura o editor padrão do git | |
export GIT_EDITOR="mvim" | |
#Melhorias para o IRB | |
export IRBRC="~/.ruby-console/_irbrc" | |
# Configuracao do RVM | |
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then | |
source $HOME/.rvm/scripts/rvm | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment