Skip to content

Instantly share code, notes, and snippets.

@lee
Created March 10, 2009 03:34
Show Gist options
  • Save lee/76705 to your computer and use it in GitHub Desktop.
Save lee/76705 to your computer and use it in GitHub Desktop.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
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[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local LIGHT_CYAN="\[\033[1;36m\]"
local YELLOW="\[\033[1;33m\]"
local PURPLE="\[\033[0;35m\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
$PURPLE\u@\h:$LIGHT_CYAN\$(parse_git_branch)$BLUE\
$YELLOW\$ "
PS2='> '
PS4='+ '
}
proml
export PATH="~/bin:/opt/local/bin:/opt/local/sbin:$PATH"
export EDITOR="mate_wait"
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
alias wp='cd ~/devProjects/weplay'
alias gogems='cd /Library/Ruby/Gems/1.8/gems'
alias lsl='ls -l'
alias ebash='mate ~/.bash_profile'
alias rbash='source ~/.bash_profile'
alias ss='./script/server'
alias sc='./script/console'
alias cuc='./script/cucumber --profile=single'
alias cucs='./script/cucumber --profile=single'
alias gb='git branch -av'
alias gba='git branch -a'
alias gs='git status'
alias gst='git status'
alias gca='git commit -v -a'
alias gitrmall='git ls-files --deleted|xargs git rm'
alias gpr='git pull --rebase'
alias gcm='git checkout master'
alias gh='github'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment