dotfiles/zsh/aliases
2014-05-17 15:31:36 -04:00

192 lines
5.5 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 bl='brew link --overwrite'
alias bld='brew link --overwrite --dry-run'
alias bower='noglob bower'
alias bu='bundle update'
alias bo='bundle open'
alias cls=clear
alias code='cd ~/code'
alias cpr='cp -r'
alias d='dart'
alias da='dartanalyzer'
alias dc='dart --checked'
alias dd='dartdoc'
alias dot='cd ~/.dotfiles'
alias dr='cd ~/Dropbox'
alias duh='du -csh'
alias functions='vim ~/.dotfiles/zsh/functions'
alias f='fg'
alias gib='gem install bundler'
alias gems='cd ~/pcg/gems'
alias history='fc -l 1'
alias histroy='history'
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 rbg='rbenv gemset active'
alias rbp='cd $RBENV_PATH/versions/$(rbenv version | sed -e "s/ (set.*$//")'
alias rbl='cd $RBENV_PATH/versions/$(rbenv version | sed -e "s/ (set.*$//")/lib/ruby'
alias rg='rails generate'
alias rl='reload'
alias rmr='rm -rf'
alias rc='rails console'
alias rs='rails server'
alias reload='source ~/.zshrc'
alias s='cd ~/.ssh'
alias sc='vim ~/.ssh/config'
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 gau='git add --update'
alias gb='git branch'
alias gbd='git branch -D'
alias gbl='git branch --all'
alias gc='git commit'
alias gcl='git clone'
alias gcm="git commit -m"
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcp='git cherry-pick'
alias gcps='git cherry-pick -n'
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 gfix="ga && git commit -a --amend -C HEAD"
alias gfo='git fetch origin'
alias gfm='git fetch origin master'
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 glogf='git log --follow'
alias gm='git merge'
alias gmff='git merge --ff-only'
alias gmffs='git merge --ff-only --squash'
alias gmtheirs='git merge -Xtheirs'
alias gp='git push'
alias gpa='git push && echo "pushing tags..." && git push --tags'
alias gpd='git push && git push heroku master'
alias gpdf='gpf && gphf'
alias gpp='git push && git push production HEAD:production'
alias gppp='git push production'
alias gppf='gpf && git push production HEAD:production -f'
alias gph='git push heroku master'
alias gphf='git push heroku master --force'
alias gpf='git push -f'
alias gpu='git push -u'
alias gpff='git pull --ff-only'
alias gpl='git pull'
alias gpo='git push origin'
alias gpom='git push origin master'
alias gpr='git pull --rebase'
alias gpt='git push --tags'
alias gr='git reset'
alias grb='git rebase'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
alias grbi='git rebase -i'
alias grbm='git fetch origin master && git rebase master'
alias grbmi='git fetch origin master && git rebase master -i'
alias grbo='git fetch origin master && git rebase origin/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='echo "use gsh instead!"'
alias gsh='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 gt='git tag'
alias gta='git tag -a'
alias gtd='git tag -d'
alias gtl='git tag -l'
alias gx='git reset --hard'
alias gxx='git reset --hard HEAD~1 && git pull --ff-only'
# Notes
alias art='cd ~/Dropbox/notes/art'
alias bucket='cd ~/Dropbox/notes/buckets'
alias daily='cd ~/Dropbox/notes/daily/daily-log'
alias log='cd ~/Dropbox/notes/daily/daily-log'
alias notes='cd ~/Dropbox/notes'
alias pn='vim ~/Dropbox/notes/project-notes'
alias sharp='vim ~/Dropbox/notes/sharpening-notes'
alias todo='vim ~/Dropbox/notes/daily/todo'
alias writing='cd ~/Dropbox/notes/writing'
# 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 pcg='cd ~/code/work/pcg'
# Work
alias pcgt='vim ~/code/work/pcg/files/time-tracker.txt'
alias pcgn='vim ~/code/work/pcg/files/personal-notes.txt'
alias pcgf='cd ~/code/work/pcg/files'
# 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'