dotfiles/zsh/aliases
2014-01-25 00:09:45 -05:00

156 lines
4.3 KiB
Plaintext

# Handle the fact that this file will be used with multiple OSs
platform=`uname`
if [[ $platform == 'Linux' ]]; then
alias l='ls -l --color'
alias ll='ls -lrth --color'
elif [[ $platform == 'Darwin' ]]; then
alias l='ls -laG'
alias ll='ls -lG'
fi
alias c='cd'
alias cd-='cd -'
alias ..='cd ../'
alias ...='cd ../..'
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..'
alias cd.....='cd ../../../..'
alias ls='ls -G'
alias aliases='vim ~/.dotfiles/zsh/aliases'
alias b='bundle'
alias bake='bundle exec rake'
alias be='bundle exec'
alias bi='bundle install'
alias be='bundle exec'
alias beg='bundle exec guard'
alias bower='noglob bower'
alias bu='bundle update'
alias cls=clear
alias code='cd ~/code'
alias cpr='cp -r'
alias d='cd ~/.dotfiles'
alias dr='cd ~/Dropbox'
alias duh='du -csh'
alias functions='vim ~/.dotfiles/zsh/functions'
alias f='fg'
alias history='fc -l 1'
alias h='heroku'
alias irb='irb --readline -r irb/completion'
alias patch='git format-patch HEAD^ --stdout > patch.diff'
alias reguard='killall -9 ruby ; guard'
alias r='rails'
alias rb='rbenv'
alias rg='rails generate'
alias rmr='rm -rf'
alias rc='rails console'
alias rs='rails server'
alias reload='source ~/.zshrc'
alias tail-logs='heroku logs -t'
alias u='cd ..'
alias v='vim'
alias vi='vim'
alias vimrc='vim ~/.vimrc'
alias q='quirk'
alias qe='quirk -e'
alias qc='quirk -c'
alias qm='quirk -m'
alias qq='quirk -t'
alias zsh='vim ~/.zshrc'
# Git
alias ammend='amend'
alias amend='git commit --amend'
alias g='gst'
alias ga='git add -A :/'
alias gaa='git add -A'
alias gae='echo "Use amend!" && git commit --amend' # Remove when not needed
alias gau='git add --update'
alias gb='git branch'
alias gbd='git branch -D'
alias gc='git commit'
alias gci='echo "Use gc!" && git commit' # Remove when no longer needed
alias gcl='git clone'
alias gcm="git commit -m"
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcp='git cherry-pick'
alias gd='git diff'
alias gdc='git diff --cached'
alias gdm='git diff master'
alias gds='git diff --stat=160,120'
alias gdw='git diff --color-words'
alias gf='git fetch'
alias gh="source ~/.githelpers && show_git_head"
alias gl='gll -25'
alias gli='git show --pretty="format:" --name-only'
alias gll="source ~/.githelpers && pretty_git_log"
alias gla='gll --all'
alias glog='git log'
alias gm='git merge'
alias gmff='git merge --ff-only'
alias gmtheirs='git merge -Xtheirs'
alias gp='git push'
alias gpd='git push && git push heroku master'
alias gph='git push heroku master'
alias gpf='git push -f'
alias gpu='git push -u'
alias gpff='git pull --ff-only'
alias gpl='git pull'
alias gpom='git push origin master'
alias gpr='git pull --rebase'
alias gr='git reset'
alias grb='git rebase'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
alias grbo='git fetch origin && git rebase origin/master'
alias grbm='git rebase master'
alias gre='git remote'
alias gref='git reflog'
alias grev='git remote -v'
alias grm='git rm'
alias gsnapshot='git stash save "snapshot: $(date)" && git stash apply "stash@{0}"'
alias gshow='git show'
alias gst='git status'
alias gs='git stash'
alias gss='git stash save'
alias gsd='git stash drop'
alias gsl='git stash list'
alias gsp='git stash pop'
alias gx='git reset --hard'
# Notes
alias art='cd ~/Dropbox/notes/art'
alias bucket='cd ~/Dropbox/notes/buckets'
alias completion='cd ~/Dropbox/notes/daily/daily-log/completion-list'
alias daily='cd ~/Dropbox/notes/daily'
alias guide='vim ~/Dropbox/notes/daily/DAILY_GUIDE'
alias log='cd ~/Dropbox/notes/daily/daily-log'
alias notes='cd ~/Dropbox/notes'
alias pn='vim ~/Dropbox/notes/project-notes'
alias powerup='vim ~/Dropbox/notes/code/powerup'
alias sharp='vim ~/Dropbox/notes/sharpening-notes'
alias todo='vim ~/Dropbox/notes/daily/todo'
# Projects
alias projects='cd ~/code/projects'
alias web='cd ~/code/projects/websites/michael.is'
alias weba='cd ~/code/projects/websites/michael.is/angular'
alias dot='cd ~/code/projects/dotfiles'
alias work='cd ~/code/work'
alias learn='cd ~/code/learning-area'
alias robo='cd ~/code/projects/robocoin'
alias roboa='cd ~/code/projects/robocoin/angular'
alias pcg='cd ~/code/work/pcg'
alias sc='cd ~/code/work/redwood/scene-app/angular'
alias cur='cd ~/code/projects/things'
# Open Source
alias ssh-discourse='ssh -F ~/code/projects/discourse/.project/vagrant.ssh.conf default'
# DB
alias start-postgres='pg_ctl -D /usr/local/var/postgres -l logfile start'