Created
August 21, 2011 18:41
-
-
Save blatyo/1160975 to your computer and use it in GitHub Desktop.
.bashrc
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
##### Aliases ##### | |
#Shortcuts | |
alias mysql="mysql -u root" | |
#Processes and Ports | |
alias fp="ps -ef | grep -i " | |
alias fpp="lsof -i -P | grep -i listen" | |
#Git | |
alias g="git" | |
alias gs="git status" | |
alias gi="git init" | |
alias gp="git push origin head" | |
alias gco="git checkout" | |
alias gcob="git checkout -b" | |
alias ga="git add" | |
alias gad="git add ." | |
alias gc="git commit -m" | |
##### Auto Complete ##### | |
# Bash | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
# Git | |
source ~/.git_complete.sh | |
##### Colors ##### | |
export COLOR_NC='\033[0m' # No Color | |
export COLOR_WHITE='\033[1;37m' | |
export COLOR_BLACK='\033[0;30m' | |
export COLOR_BLUE='\033[0;34m' | |
export COLOR_LIGHT_BLUE='\033[1;34m' | |
export COLOR_GREEN='\033[0;32m' | |
export COLOR_LIGHT_GREEN='\033[1;32m' | |
export COLOR_CYAN='\033[0;36m' | |
export COLOR_LIGHT_CYAN='\033[1;36m' | |
export COLOR_RED='\033[0;31m' | |
export COLOR_LIGHT_RED='\033[1;31m' | |
export COLOR_PURPLE='\033[0;35m' | |
export COLOR_LIGHT_PURPLE='\033[1;35m' | |
export COLOR_BROWN='\033[0;33m' | |
export COLOR_YELLOW='\033[1;33m' | |
export COLOR_GRAY='\033[1;30m' | |
export COLOR_LIGHT_GRAY='\033[0;37m' | |
##### Functions ##### | |
# History Find | |
hf(){ | |
grep "$@" ~/.bash_history | |
} | |
# Git | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
##### Readline Settings ##### | |
bind "set completion-ignore-case on" | |
bind "set bell-style none" # No bell, because it's damn annoying | |
bind "set show-all-if-ambiguous On" # this allows you to automatically show completion without double tab-ing | |
##### Exports ##### | |
# MySQL | |
PATH=$PATH:/usr/local/mysql/bin | |
# Editor | |
export EDITOR='mate -w' | |
export GEM_OPEN_EDITOR='mate' | |
export GIT_EDITOR=$EDITOR | |
export VISUAL=$EDITOR | |
# ls Colors | |
export CLICOLOR=1 | |
export LSCOLORS=CxGxExDxBxegedabagacad | |
# Title of Window | |
export PROMPT_COMMAND='echo -ne "\033]0;${PWD}"; echo -ne "\007"' | |
export HISTSIZE=1000000 | |
# Change Prompt | |
export PS1="$COLOR_GREEN\w$COLOR_WHITE"'$(__git_ps1 "[%s$COLOR_RED$(parse_git_dirty)$COLOR_WHITE]")''[$(~/.rvm/bin/rvm-prompt)]'"\n> " | |
# Ruby | |
export IRBRC="$HOME/.irbrc" | |
# RVM | |
[[ -s "/Users/blatyo/.rvm/scripts/rvm" ]] && source "/Users/blatyo/.rvm/scripts/rvm" |
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
~/code/acts_as_search_and_destroy[master*][ruby-1.9.2-p290@acts_as_search_and_destroy] | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment