dotfiles/zsh/aliases
2014-12-01 21:06:55 -05:00

227 lines
7.1 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'
alias lll='ls -lrath'
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 -lG --color'
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 hc='heroku config'
alias hca='heroku config:add'
alias hcu='heroku config:unset'
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 lmi='lein modules install'
alias mc='mvn compile'
alias mct='mvn test'
alias mi='mvn install'
alias mci='mvn clean install'
alias mp='mvn package'
alias mcp='mvn clean package'
alias opensource='cd ~/jelly/open-source'
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 t='tree'
alias tail-logs='heroku logs -t'
alias u='cd ..'
alias v='vim'
alias vi='vim'
alias vh='vagrant halt'
alias vs='vagrant ssh'
alias vu='vagrant up'
alias vimrc='vim ~/.vimrc'
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 gbm='git branch -m'
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 gcpa='git cherry-pick --abort'
alias gcpc='git cherry-pick --continue'
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="git commit --amend -C HEAD"
alias gfixs="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 gmnoff='git merge --no-ff'
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='echo "pushing $(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3) to Heroku master" && git push heroku HEAD:master'
alias gphf='git push heroku master --force'
alias gpf='git push -f'
alias gpu='git push -u origin master'
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'
alias greao='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 gsdl='git stash drop stash@{0}'
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'
# git stats
alias gstats="echo 'Total commits: $(git rev-list HEAD --count)'; echo '\nAuthor breakdown:'; git shortlog | grep -E '^[^ ]'"
# Notes
alias art='cd ~/Dropbox/notes/art'
alias notes='cd ~/jelly/documents'
alias bucket='cd ~/Dropbox/notes/buckets'
alias pn='vim ~/jelly/documents/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 ~/jelly/projects'
alias web='cd ~/jelly/projects/websites/michael.is'
alias weba='cd ~/jelly/projects/websites/michael.is/angular'
alias dot='cd ~/jelly/dev/projects/dotfiles'
alias work='cd ~/work'
alias brain='cd ~/brain'
alias school='cd ~/brain/school'
alias pcg='cd ~/work/pcg'
alias dive='cd ~/work/pcg/dive-network/dive'
alias di='cd ~/work/pcg/dive-network/dive/src-cljs/dive'
# Work
alias pcgn='vim ~/work/pcg/files/notes/personal-notes.md'
alias pcgr='vim ~/work/pcg/files/notes/refactoring-notes.md'
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'
alias dstaging='ssh pcg-user@192.168.2.20 -i ~/.ssh/dive_20140923_rsa'
alias dclear='ssh pcg-user@192.168.2.90 -i ~/.ssh/dive_20140923_rsa'
alias dh='git push heroku-staging master -f'