Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (52 sloc) 1.91 KB
# Environment-tweaking
alias dotfiles='e ~/dotfiles/'
alias rsc='source ~/.bash_profile; source ~/dotfiles/bashrc'
# Shortcut for editing/reloading /etc/hosts
alias edit_hosts="mate /private/etc/hosts"
alias reload_hosts="dscacheutil -flushcache"
# misc
alias holler="osascript -e 'display notification \"That thing you asked for is done.\" with title \"Dude!\"'; say process finished"
# to get pass/fail, consider replacing this with a function: http://blog.larsstrand.org/article.php?story=BashPromptWithExitStatus
# Command-line fu
alias e='mate'
alias e.='mate .'
alias ll='ls -lhG'
alias l1='ls -1hG'
alias lal='ls -alhG'
alias ls='ls -hG'
alias df='df -h'
alias du='du -h'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# Lazy ancestor directory ziggurat of doom
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias .......='cd ../../../../../..'
alias ........='cd ../../../../../../..'
alias .........='cd ../../../../../../../..'
# git
alias g='git'; complete -o default -o nospace -F _git g
alias gb='git branch'; complete -o default -o nospace -F _git_branch gb
alias gco='git checkout'; complete -o default -o nospace -F _git_checkout gco
alias gcp='git cherry-pick'
alias gd='git diff --color'; complete -o default -o nospace -F _git_diff gd
alias gg+='git log --oneline --abbrev-commit --all --graph --decorate --color'
alias gg='gg+ | head -n `expr $LINES / 2`'
alias gs='git status -bs'
alias gst='git status'
alias gwip='git reset --soft HEAD^ && git reset HEAD .'
alias gpfwl='git push --force-with-lease'
# Faster, pussycat! Test! Test!
alias rtf='rake test:fast'
# Rails
alias r='bundle exec rails'
# Bundler
alias b='bundle'
alias be='bundle exec'
alias bx='bundle exec'
alias bi='(bundle check || bundle install --jobs=4)'
alias brake='bundle exec rake'