Created
December 9, 2011 07:50
-
-
Save hexatridecimal/1450661 to your computer and use it in GitHub Desktop.
My Bash_Profile
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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function | |
export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
function get_rails_env { | |
if [[ $RAILS_ENV == '' ]] | |
then | |
echo "development" | |
else | |
echo $RAILS_ENV | |
fi | |
} | |
function precmd() { | |
PROMPT="%n@%m %~$(parse_git_branch)%# " | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" | |
local WHITE="\[\033[0;37m\]" | |
local LIGHT_GRAY="\[\033[0;37m\]" | |
case $TERM in | |
xterm*) | |
TITLEBAR='\[\033]0;\u@\h:\w\007\]' | |
;; | |
*) | |
TITLEBAR='\[\033]0;\u@\h:\w\007\]' | |
;; | |
esac | |
export PS1="\$(get_rails_env):${TITLEBAR}\ | |
\u@$GREEN\w$BLUE\$(parse_git_branch)\ | |
$WHITE: " | |
export PS2='> ' | |
export PS4='+ ' | |
} | |
proml | |
export NODE_PATH='/usr/local/lib/node' | |
alias bashme='mvim ~/.bash_profile' | |
alias bashon='. ~/.bash_profile' | |
alias gst='git status' | |
alias co='git checkout' | |
alias ga='git add' | |
alias gaa='git add .' | |
alias gr='git rebase' | |
alias gpr='git pull --rebase' | |
alias gp='git pull' | |
alias gh='git push' | |
alias gd='git diff | vim' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias ggco='git rebase --continue' | |
alias ggcs='git rebase --skip' | |
alias ggca='git rebase --abort' | |
alias gsl='git stash list' | |
alias gsp='git stash pop' | |
alias gsa='git stash apply' | |
alias gsc='git stash clear' | |
alias gbl='git branch list' | |
alias gri='git rebase -i' | |
alias zork="cd $HOME/Library/Application\ Support/zork1/DATA/ && frotz $HOME/Library/Application\ Support/zork1/DATA/ZORK1.DAT" | |
export CLICOLOR=1 | |
export LSCOLORS=dxfxcxdxbxegedabagacad |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment