Created
December 4, 2012 23:10
-
-
Save michaelespinosa/4210103 to your computer and use it in GitHub Desktop.
My .bashrc file
This file contains hidden or 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
### AWS Developer Tools ### | |
export EC2_HOME=~/.ec2 | |
export PATH=$PATH:$EC2_HOME/bin:/usr/local/bin | |
##export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem` | |
##export EC2_CERT=`ls $EC2_HOME/cert-*.pem` | |
export EC2_PRIVATE_KEY=***.pem | |
export EC2_CERT=***.pem | |
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/ | |
### History handling ### | |
## Erase duplicates | |
export HISTCONTROL=erasedups | |
## Resize history size | |
export HISTSIZE=5000 | |
## Append to bash_history if app quits | |
shopt -s histappend | |
## Sublime Text 2 as editor | |
alias subl="'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'" | |
## alias nano="subl" | |
## export EDITOR="subl" | |
export EDITOR='subl -w' | |
### Aliases ### | |
alias ls='ls -GFh' | |
alias la='ls -A' | |
alias l='ls -lAh' | |
alias ..='cd ..' | |
alias ...='cd .. ; cd ..' | |
alias o='open' | |
alias o.='open .' | |
alias c='pygmentize -O style=monokai -f console256 -g' | |
# Laravel | |
alias pa='php artisan' | |
## Git Mountian Lion Fix | |
## export PATH=$PATH:/usr/local/git/bin/ | |
## Git aliases | |
alias gi='git init' | |
alias glog="git log --format='%Cgreen%h%Creset %C(cyan)%an%Creset - %s' --graph" | |
alias gs='git status' | |
alias gl='git log' | |
alias ga='git add .' | |
alias gp='git push' | |
function gc(){ | |
git commit -am "${1}" | |
} | |
export CLICOLOR=1 | |
### Git Status ### | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "+" | |
} | |
function parse_git_color { | |
if [ "$(parse_git_dirty)" == "+" ]; then | |
echo '\033[0;31m\' #red | |
else | |
echo '\033[0;32m\' #green | |
fi | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/$(parse_git_color)$(parse_git_dirty)[git:\1]/" | |
} | |
export PS1='\033[1;30m\n\u:\033[0;33m\w $(parse_git_branch) \n\033[0;31m➝ \033[0m' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment