Skip to content

Instantly share code, notes, and snippets.

@pcottle
Last active October 8, 2015 13:07
Show Gist options
  • Save pcottle/3336184 to your computer and use it in GitHub Desktop.
Save pcottle/3336184 to your computer and use it in GitHub Desktop.
bashrc
export EDITOR=vim
source ~/git-completion.bash
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\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
$GREEN[$GREEN\u:\w$LIGHT_GRAY:\$(parse_git_branch)$GREEN]\
$GREEN\$ "
PS2='> '
PS4='+ '
}
proml
alias oneline="git log --pretty=oneline"
alias onelinedates="git log --pretty=format:'%h was %an, %ai, message: %s'"
alias grc="git rebase --continue"
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
PATH="/usr/bin:${PATH}"
export PATH
# curlish!
PATH="~/.bin:${PATH}"
export PATH
# PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
# export PATH
# tex stuff
# PATH=/usr/local/texlive/2012/bin/universal-darwin:$PATH; export PATH
### Added by the Heroku Toolbelt
# export PATH="/usr/local/heroku/bin:$PATH"
alias gitrage="git pull --rebase; git push"
alias hrage="git push heroku master; git push"
alias slime='open -a "Sublime Text 2"'
alias gitcp="git commit -am 'asd'; git push"
alias ga="git add"
alias go="git checkout"
alias gs="git status -sb"
alias cdc="pbpaste=\$(pwd)"
alias cdp="cd \$(echo \$pbpaste)"
# sublime plugins: gitgutter, syntax highlighting, etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment