Created
February 17, 2012 16:23
-
-
Save sbone/1854202 to your computer and use it in GitHub Desktop.
Customized .bashrc
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
# RVM | |
export PATH="./bin:$PATH" | |
[[ -s "/Users/Steven/.rvm/scripts/rvm" ]] && source "/Users/Steven/.rvm/scripts/rvm" | |
# Git command and branch name tab-completion | |
source ~/git-completion.bash | |
# Check if directory is a Git repo | |
# Customized from http://vvv.tobiassjosten.net/git/add-current-git-branch-to-your-bash-prompt | |
git_prompt () | |
{ | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
return 0 | |
fi | |
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') | |
if git diff --quiet 2>/dev/null >&2; then | |
git_color="${c_git_clean}" | |
else | |
git_color=${c_git_dirty} | |
fi | |
echo " [$git_color$git_branch${c_reset}]" | |
} | |
# The prompt [Show Git branch if applicable] | |
PS1='\e[0;34m\w\e[m\e[0;36m$(git_prompt)\e[m | |
==> ' | |
# Aliases | |
# Sublime | |
alias sub="~/bin/subl" | |
alias s="sub ." | |
# System | |
alias ..="cd .." | |
alias ls="ls -la" | |
alias rs="rails s" | |
alias rs31="rails s -p 3001" | |
alias rs32="rails s -p 3002" | |
alias ors="ruby script/server" | |
# Use Sublime as default text editor | |
export EDITOR="~/bin/subl -w" | |
# Recursively delete .DS_Store files | |
# http://alex.tsd.net.au/2010/09/14/recursively-remove-ds_store-files/ | |
alias rmdst="find . -name '*.DS_Store' -type f -delete" | |
# instant simple server | |
# https://gist.github.com/1525217 | |
alias server="open http://localhost:8000 && python -m SimpleHTTPServer" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment