dotfiles/zsh/aliases

192 lines
5.5 KiB
Plaintext
Raw Normal View History

2013-07-07 21:25:47 +00:00
# Handle the fact that this file will be used with multiple OSs
platform=`uname`
if [[ $platform == 'Linux' ]]; then
2013-07-07 21:30:11 +00:00
alias l='ls -l --color'
alias ll='ls -lrth --color'
2013-07-07 21:25:47 +00:00
elif [[ $platform == 'Darwin' ]]; then
2013-07-07 21:30:11 +00:00
alias l='ls -laG'
alias ll='ls -lG'
2013-07-07 21:25:47 +00:00
fi
2013-07-07 21:30:11 +00:00
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'
2013-07-07 21:25:47 +00:00
alias aliases='vim ~/.dotfiles/zsh/aliases'
2013-07-10 16:13:13 +00:00
alias b='bundle'
2013-07-07 21:25:47 +00:00
alias bake='bundle exec rake'
alias be='bundle exec'
alias bi='bundle install'
alias be='bundle exec'
2013-07-07 21:30:11 +00:00
alias beg='bundle exec guard'
2014-05-17 19:31:36 +00:00
alias bl='brew link --overwrite'
alias bld='brew link --overwrite --dry-run'
2013-09-16 20:55:52 +00:00
alias bower='noglob bower'
2013-07-07 21:25:47 +00:00
alias bu='bundle update'
2014-03-07 20:00:19 +00:00
alias bo='bundle open'
2013-07-07 21:30:11 +00:00
alias cls=clear
2013-07-07 21:25:47 +00:00
alias code='cd ~/code'
alias cpr='cp -r'
2014-02-17 07:00:21 +00:00
alias d='dart'
2014-03-07 20:00:19 +00:00
alias da='dartanalyzer'
alias dc='dart --checked'
alias dd='dartdoc'
2014-02-17 07:00:21 +00:00
alias dot='cd ~/.dotfiles'
2013-07-07 21:25:47 +00:00
alias dr='cd ~/Dropbox'
2013-07-07 21:30:11 +00:00
alias duh='du -csh'
2013-07-10 16:13:13 +00:00
alias functions='vim ~/.dotfiles/zsh/functions'
alias f='fg'
2014-05-17 19:31:36 +00:00
alias gib='gem install bundler'
alias gems='cd ~/pcg/gems'
2013-07-10 16:13:13 +00:00
alias history='fc -l 1'
2014-03-07 20:00:19 +00:00
alias histroy='history'
2013-07-10 16:13:13 +00:00
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'
2014-03-07 20:00:19 +00:00
alias rbg='rbenv gemset active'
2014-02-17 07:00:21 +00:00
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'
2014-01-25 04:04:23 +00:00
alias rg='rails generate'
2014-05-17 19:31:36 +00:00
alias rl='reload'
2013-07-16 23:36:06 +00:00
alias rmr='rm -rf'
2013-07-10 16:13:13 +00:00
alias rc='rails console'
2013-07-29 14:41:32 +00:00
alias rs='rails server'
2013-07-10 16:13:13 +00:00
alias reload='source ~/.zshrc'
2014-02-17 07:00:21 +00:00
alias s='cd ~/.ssh'
alias sc='vim ~/.ssh/config'
2013-07-10 16:13:13 +00:00
alias tail-logs='heroku logs -t'
alias u='cd ..'
alias v='vim'
alias vi='vim'
alias vimrc='vim ~/.vimrc'
2013-07-16 23:36:06 +00:00
alias q='quirk'
alias qe='quirk -e'
2013-07-16 23:36:06 +00:00
alias qc='quirk -c'
alias qm='quirk -m'
alias qq='quirk -t'
2013-07-10 16:13:13 +00:00
alias zsh='vim ~/.zshrc'
2013-07-07 21:30:11 +00:00
# Git
alias ammend='amend'
alias amend='git commit --amend'
2014-01-25 04:04:23 +00:00
alias g='gst'
alias ga='git add -A :/'
alias gaa='git add -A'
2013-07-07 21:30:11 +00:00
alias gau='git add --update'
alias gb='git branch'
2013-07-16 23:36:06 +00:00
alias gbd='git branch -D'
2014-05-17 19:31:36 +00:00
alias gbl='git branch --all'
2013-07-07 21:30:11 +00:00
alias gc='git commit'
2013-07-07 21:25:47 +00:00
alias gcl='git clone'
alias gcm="git commit -m"
alias gco='git checkout'
2013-07-16 23:36:06 +00:00
alias gcob='git checkout -b'
2013-07-07 21:30:11 +00:00
alias gcp='git cherry-pick'
2014-05-17 19:31:36 +00:00
alias gcps='git cherry-pick -n'
2013-07-07 21:25:47 +00:00
alias gd='git diff'
alias gdc='git diff --cached'
alias gdm='git diff master'
2013-07-07 21:30:11 +00:00
alias gds='git diff --stat=160,120'
alias gdw='git diff --color-words'
alias gf='git fetch'
2014-02-17 07:00:21 +00:00
alias gfix="ga && git commit -a --amend -C HEAD"
alias gfo='git fetch origin'
alias gfm='git fetch origin master'
2013-07-07 21:30:11 +00:00
alias gh="source ~/.githelpers && show_git_head"
2013-07-10 16:13:13 +00:00
alias gl='gll -25'
2014-01-25 04:04:23 +00:00
alias gli='git show --pretty="format:" --name-only'
2013-07-10 16:13:13 +00:00
alias gll="source ~/.githelpers && pretty_git_log"
alias gla='gll --all'
2014-01-25 04:04:23 +00:00
alias glog='git log'
2014-02-17 07:00:21 +00:00
alias glogf='git log --follow'
2013-07-25 16:54:40 +00:00
alias gm='git merge'
2013-07-10 16:13:13 +00:00
alias gmff='git merge --ff-only'
2014-02-17 07:00:21 +00:00
alias gmffs='git merge --ff-only --squash'
2013-07-07 21:30:11 +00:00
alias gmtheirs='git merge -Xtheirs'
2013-07-07 21:25:47 +00:00
alias gp='git push'
2014-05-17 19:31:36 +00:00
alias gpa='git push && echo "pushing tags..." && git push --tags'
2014-01-25 04:04:23 +00:00
alias gpd='git push && git push heroku master'
2014-03-07 20:00:19 +00:00
alias gpdf='gpf && gphf'
2014-02-17 07:00:21 +00:00
alias gpp='git push && git push production HEAD:production'
2014-03-07 20:00:19 +00:00
alias gppp='git push production'
alias gppf='gpf && git push production HEAD:production -f'
2014-01-25 04:04:23 +00:00
alias gph='git push heroku master'
2014-03-07 20:00:19 +00:00
alias gphf='git push heroku master --force'
2013-07-07 21:25:47 +00:00
alias gpf='git push -f'
2013-09-25 22:54:37 +00:00
alias gpu='git push -u'
2013-07-07 21:30:11 +00:00
alias gpff='git pull --ff-only'
2013-07-10 16:13:13 +00:00
alias gpl='git pull'
2014-02-17 07:00:21 +00:00
alias gpo='git push origin'
2013-07-07 21:30:11 +00:00
alias gpom='git push origin master'
2013-07-07 21:25:47 +00:00
alias gpr='git pull --rebase'
2014-05-17 19:31:36 +00:00
alias gpt='git push --tags'
2013-07-07 21:30:11 +00:00
alias gr='git reset'
2014-01-25 04:04:23 +00:00
alias grb='git rebase'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
2014-02-17 07:00:21 +00:00
alias grbi='git rebase -i'
alias grbm='git fetch origin master && git rebase master'
2014-05-17 19:31:36 +00:00
alias grbmi='git fetch origin master && git rebase master -i'
2014-02-17 07:00:21 +00:00
alias grbo='git fetch origin master && git rebase origin/master'
2013-07-07 21:30:11 +00:00
alias gre='git remote'
2013-09-25 22:54:37 +00:00
alias gref='git reflog'
2013-08-13 15:17:54 +00:00
alias grev='git remote -v'
2013-07-16 15:24:18 +00:00
alias grm='git rm'
2013-07-07 21:30:11 +00:00
alias gsnapshot='git stash save "snapshot: $(date)" && git stash apply "stash@{0}"'
2014-03-07 20:00:19 +00:00
alias gshow='echo "use gsh instead!"'
alias gsh='git show'
2013-07-07 21:30:11 +00:00
alias gst='git status'
alias gs='git stash'
alias gss='git stash save'
2013-07-07 21:30:11 +00:00
alias gsd='git stash drop'
alias gsl='git stash list'
alias gsp='git stash pop'
2014-05-17 19:31:36 +00:00
alias gt='git tag'
alias gta='git tag -a'
alias gtd='git tag -d'
alias gtl='git tag -l'
2013-07-07 21:30:11 +00:00
alias gx='git reset --hard'
2014-05-17 19:31:36 +00:00
alias gxx='git reset --hard HEAD~1 && git pull --ff-only'
2013-07-07 21:30:11 +00:00
# Notes
2014-01-25 04:04:23 +00:00
alias art='cd ~/Dropbox/notes/art'
alias bucket='cd ~/Dropbox/notes/buckets'
2014-05-17 19:31:36 +00:00
alias daily='cd ~/Dropbox/notes/daily/daily-log'
2014-01-25 04:04:23 +00:00
alias log='cd ~/Dropbox/notes/daily/daily-log'
alias notes='cd ~/Dropbox/notes'
2013-07-27 00:04:21 +00:00
alias pn='vim ~/Dropbox/notes/project-notes'
2014-01-25 04:04:23 +00:00
alias sharp='vim ~/Dropbox/notes/sharpening-notes'
alias todo='vim ~/Dropbox/notes/daily/todo'
2014-05-17 19:31:36 +00:00
alias writing='cd ~/Dropbox/notes/writing'
2013-07-07 21:25:47 +00:00
2013-07-07 21:30:11 +00:00
# Projects
alias projects='cd ~/code/projects'
2014-01-25 04:04:23 +00:00
alias web='cd ~/code/projects/websites/michael.is'
alias weba='cd ~/code/projects/websites/michael.is/angular'
alias dot='cd ~/code/projects/dotfiles'
2013-09-16 20:55:52 +00:00
alias work='cd ~/code/work'
2013-07-07 21:30:11 +00:00
alias learn='cd ~/code/learning-area'
2014-01-25 04:04:23 +00:00
alias pcg='cd ~/code/work/pcg'
2013-07-07 21:25:47 +00:00
2014-02-17 07:00:21 +00:00
# Work
2014-03-07 20:00:19 +00:00
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'
2014-02-17 07:00:21 +00:00
2013-07-24 03:20:06 +00:00
# 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'
2014-01-25 04:04:23 +00:00