Created
May 9, 2009 18:48
-
-
Save domwom/109371 to your computer and use it in GitHub Desktop.
bash profile
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
export TERM=xterm-color | |
export LSCOLORS=dxfxcxdxbxegedabagacad | |
alias ls='ls -G' | |
alias ll='ls -l' | |
alias l='ls -la' | |
alias la='ls -a' | |
alias gs='git status' | |
# tweak bash tab completion | |
bind "set completion-ignore-case on" | |
bind "set bell-style none" | |
bind "set show-all-if-ambiguous On" | |
export PATH=$PATH:/usr/sbin/:/usr/local/bin:/Developer/Tools:/opt/local/bin:$HOME/sys | |
# git tab completion | |
git_completion_script=/usr/local/git/contrib/completion/git-completion.bash | |
if test -f $git_completion_script; then | |
source $git_completion_script | |
fi | |
# Capistrano / Deprec tab completion | |
source /Library/Ruby/Gems/1.8/gems/deprec-2.0.9/lib/deprec_cmd_completion.sh | |
# Show current branch in console prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="\w\$(parse_git_branch) $ " | |
# init new rails app with template from github | |
function railsapp { | |
appname=$1 | |
shift 1 | |
rails $appname -m http://gist.github.com/109413.txt $@ | |
} | |
# fetch bash_profile from github and source it | |
function update-bash_profile { | |
gistid="109371" | |
old="${HOME}/.bash_profile.old" | |
new="${HOME}/.bash_profile.new" | |
current="${HOME}/.bash_profile" | |
if test -f $current; then | |
gist $gistid > $new && mv $current $old && mv $new $current | |
else | |
gist $gistid > $current | |
fi | |
source $current | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment