# 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 al='aliases' alias b='bundle' alias be='bundle exec' alias bi='bundle install' alias br='bundle exec rake' 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 ho='heroku open' alias hca='heroku config:add' alias irb='irb --readline -r irb/completion' alias li='lineman' alias lir='lineman run' alias lib='lineman build' alias lig='lineman grunt' alias lis='lineman spec' alias lic='lineman spec-ci' alias patch='git format-patch HEAD^ --stdout > patch.diff' alias reguard='killall -9 ruby ; guard' alias r='rails' alias rr='bundle exec rake release' 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 amends='git commit -S --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 gcs='git commit -S' alias gcl='git clone' alias gcm="git commit -m" alias gcms="git commit -S -m" alias gco='git checkout' alias gcob='git checkout -b' alias gcon='vi .git/config' 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 gfixs="ga && git commit -S -a --amend -C HEAD" # signed 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 grea='git remote add origin' 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 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 notes='cd ~/Dropbox/notes' alias bucket='cd ~/Dropbox/notes/buckets' alias pn='vim ~/Dropbox/notes/stack.txt' alias sharp='vim ~/Dropbox/notes/sharpening-notes' alias writing='cd ~/brain/writing' alias what='cd ~/brain/writing/2014/what-happened' # 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 ~/work' alias brain='cd ~/brain' alias school='cd ~/brain/school' alias pcg='cd ~/work/pcg' # Work alias pcgn='vim ~/work/pcg/files/personal-notes.txt' alias pcgf='cd ~/work/pcg/files' alias bastion='ssh 54.86.79.26 -l pcg-user -i ~/.ssh/pcg-ec2-pcg-user' alias sigma='cd ~/pcg/pcg-ansible/ && ssh -vF files/ssh/config pcg-user@sigma' alias qonos='cd ~/pcg/pcg-ansible/ && ssh -vF files/ssh/config pcg-user@qonos' alias samza1='cd ~/pcg/pcg-ansible/ && ssh -vF files/ssh/config pcg-user@samza1' alias samza2='cd ~/pcg/pcg-ansible/ && ssh -vF files/ssh/config pcg-user@samza2' alias samza3='cd ~/pcg/pcg-ansible/ && ssh -vF files/ssh/config pcg-user@samza3'