2012-01-31 12:46:41 +08:00
|
|
|
# Aliases in this file are bash and zsh compatible
|
|
|
|
|
|
|
|
# Don't change. The following determines where YADR is installed.
|
2012-09-15 03:30:08 +08:00
|
|
|
yadr=$HOME/.yadr
|
2012-01-31 12:46:41 +08:00
|
|
|
|
|
|
|
# YADR support
|
|
|
|
alias yav='yadr vim-add-plugin'
|
2012-10-09 12:38:21 +08:00
|
|
|
alias yuv='yadr update-plugins' #FIXME: backwards compatibility. Kill me after Jan 1, 2013
|
|
|
|
alias yup='yadr update-plugins'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias yip='yadr init-plugins'
|
|
|
|
|
|
|
|
# PS
|
Support for @sorin-ionescu rewrite of oh-my-zsh
Sorin's OMZ rewrite is a bit nicer, as it's written in more
native style ZSH, doesn't do auto updates, and incorporates
many bugfixes, and is more actively maintained than Robby's branch.
For now, YADR supports both, so if you want to try out the sorin
branch, go to sorin-ionescu/oh-my-zsh, install it, and rerun
the YADR installer so that the skwp theme is installed for you.
If you want to have them side by side for comparison, rename the
old robby one to ~/.oh-my-zsh.robby or similar, so you can toggle
back and forth through renames, or symlinks.
2012-04-24 01:32:10 +08:00
|
|
|
alias psa="ps aux"
|
2012-01-31 12:46:41 +08:00
|
|
|
alias psg="ps aux | grep "
|
|
|
|
alias psr='ps aux | grep ruby'
|
|
|
|
|
|
|
|
# Moving around
|
|
|
|
alias ..='cd ..'
|
|
|
|
alias cdb='cd -'
|
|
|
|
|
|
|
|
# Show human friendly numbers and colors
|
|
|
|
alias df='df -h'
|
|
|
|
alias ll='ls -alGh'
|
|
|
|
alias ls='ls -Gh'
|
|
|
|
alias du='du -h -d 2'
|
|
|
|
|
|
|
|
# show me files matching "ls grep"
|
|
|
|
alias lsg='ll | grep'
|
|
|
|
|
|
|
|
# Alias Editing
|
2012-04-05 13:56:51 +08:00
|
|
|
alias ae='vi $yadr/zsh/aliases.zsh' #alias edit
|
|
|
|
alias ar='source $yadr/zsh/aliases.zsh' #alias reload
|
2012-01-31 12:46:41 +08:00
|
|
|
|
2012-03-02 05:40:43 +08:00
|
|
|
# vim using
|
2012-10-12 15:14:33 +08:00
|
|
|
if [ "$(command -v brew)" ]; then
|
|
|
|
alias vim=$(brew ls macvim | grep Contents/MacOS/Vim)
|
|
|
|
fi
|
2012-03-02 05:40:43 +08:00
|
|
|
|
2012-01-31 12:46:41 +08:00
|
|
|
# vimrc editing
|
|
|
|
alias ve='vi ~/.vimrc'
|
|
|
|
|
|
|
|
# zsh profile editing
|
|
|
|
alias ze='vi ~/.zshrc'
|
|
|
|
alias zr='source ~/.zshrc'
|
|
|
|
|
|
|
|
# Git Aliases
|
|
|
|
alias gs='git status'
|
|
|
|
alias gstsh='git stash'
|
|
|
|
alias gst='git stash'
|
2012-10-24 23:36:17 +08:00
|
|
|
alias gsp='git stash pop'
|
|
|
|
alias gsa='git stash apply'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias gsh='git show'
|
|
|
|
alias gshw='git show'
|
|
|
|
alias gshow='git show'
|
|
|
|
alias gi='vi .gitignore'
|
|
|
|
alias gcm='git ci -m'
|
|
|
|
alias gcim='git ci -m'
|
|
|
|
alias gci='git ci'
|
|
|
|
alias gco='git co'
|
2012-06-23 00:09:59 +08:00
|
|
|
alias gcp='git cp'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias ga='git add -A'
|
|
|
|
alias guns='git unstage'
|
|
|
|
alias gunc='git uncommit'
|
|
|
|
alias gm='git merge'
|
|
|
|
alias gms='git merge --squash'
|
Support for @sorin-ionescu rewrite of oh-my-zsh
Sorin's OMZ rewrite is a bit nicer, as it's written in more
native style ZSH, doesn't do auto updates, and incorporates
many bugfixes, and is more actively maintained than Robby's branch.
For now, YADR supports both, so if you want to try out the sorin
branch, go to sorin-ionescu/oh-my-zsh, install it, and rerun
the YADR installer so that the skwp theme is installed for you.
If you want to have them side by side for comparison, rename the
old robby one to ~/.oh-my-zsh.robby or similar, so you can toggle
back and forth through renames, or symlinks.
2012-04-24 01:32:10 +08:00
|
|
|
alias gam='git amend --reset-author'
|
2012-09-27 01:23:39 +08:00
|
|
|
alias grv='git remote -v'
|
2012-10-08 13:09:36 +08:00
|
|
|
alias grr='git remote rm'
|
|
|
|
alias grad='git remote add'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias gr='git rebase'
|
|
|
|
alias gra='git rebase --abort'
|
2012-04-21 01:15:08 +08:00
|
|
|
alias ggrc='git rebase --continue'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias gbi='git rebase --interactive'
|
|
|
|
alias gl='git l'
|
|
|
|
alias glg='git l'
|
|
|
|
alias glog='git l'
|
|
|
|
alias co='git co'
|
|
|
|
alias gf='git fetch'
|
|
|
|
alias gfch='git fetch'
|
|
|
|
alias gd='git diff'
|
|
|
|
alias gb='git b'
|
2012-10-08 13:09:36 +08:00
|
|
|
alias gbd='git b -D -w'
|
|
|
|
alias gdc='git diff --cached -w'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias gpub='grb publish'
|
|
|
|
alias gtr='grb track'
|
|
|
|
alias gpl='git pull'
|
|
|
|
alias gplr='git pull --rebase'
|
|
|
|
alias gps='git push'
|
|
|
|
alias gpsh='git push'
|
|
|
|
alias gnb='git nb' # new branch aka checkout -b
|
2012-10-12 15:14:33 +08:00
|
|
|
alias grs='git reset'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias grsh='git reset --hard'
|
|
|
|
alias gcln='git clean'
|
|
|
|
alias gclndf='git clean -df'
|
2012-10-12 15:14:33 +08:00
|
|
|
alias gclndfx='git clean -dfx'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias gsm='git submodule'
|
|
|
|
alias gsmi='git submodule init'
|
|
|
|
alias gsmu='git submodule update'
|
|
|
|
alias gt='git t'
|
2012-11-10 03:40:16 +08:00
|
|
|
alias gbg='git bisect good'
|
|
|
|
alias gbb='git bisect bad'
|
2012-01-31 12:46:41 +08:00
|
|
|
|
|
|
|
# Common shell functions
|
|
|
|
alias less='less -r'
|
|
|
|
alias tf='tail -f'
|
|
|
|
alias l='less'
|
|
|
|
alias lh='ls -alt | head' # see the last modified files
|
|
|
|
alias screen='TERM=screen screen'
|
|
|
|
alias cl='clear'
|
|
|
|
|
|
|
|
# Zippin
|
|
|
|
alias gz='tar -zcvf'
|
|
|
|
|
|
|
|
# Ruby
|
2012-11-10 03:40:16 +08:00
|
|
|
alias c='rails c' # Rails 3
|
2012-07-11 00:54:01 +08:00
|
|
|
alias co='script/console --irb=pry' # Rails 2
|
2012-04-20 08:55:41 +08:00
|
|
|
alias ts='thin start'
|
2012-01-31 12:46:41 +08:00
|
|
|
alias ms='mongrel_rails start'
|
2012-05-19 05:08:46 +08:00
|
|
|
alias tfdl='tail -f log/development.log'
|
2012-10-08 13:09:36 +08:00
|
|
|
alias tftl='tail -f log/test.log'
|
2012-01-31 12:46:41 +08:00
|
|
|
|
|
|
|
# Vim/ctags "mctags = make ctags", using the ruby specific version
|
|
|
|
# to save some time
|
|
|
|
alias mctags=~/.bin/run_tags.rb #'/opt/local/bin/ctags -Rf ./tags *'
|
|
|
|
|
|
|
|
alias ka9='killall -9'
|
|
|
|
alias k9='kill -9'
|
|
|
|
|
|
|
|
# Gem install
|
|
|
|
alias sgi='sudo gem install --no-ri --no-rdoc'
|
|
|
|
|
|
|
|
# TODOS
|
|
|
|
# This uses NValt (NotationalVelocity alt fork) - http://brettterpstra.com/project/nvalt/
|
|
|
|
# to find the note called 'todo'
|
|
|
|
alias todo='open nvalt://find/todo'
|
|
|
|
|
2012-05-30 16:34:20 +08:00
|
|
|
# Forward port 80 to 3000
|
|
|
|
alias portforward='sudo ipfw add 1000 forward 127.0.0.1,3000 ip from any to any 80 in'
|
2012-06-01 04:49:40 +08:00
|
|
|
|
|
|
|
alias rdm='rake db:migrate'
|
|
|
|
alias rdmr='rake db:migrate:redo'
|
2012-10-24 23:36:34 +08:00
|
|
|
|
|
|
|
# Zeus
|
|
|
|
alias zs='zeus server'
|
|
|
|
alias zc='zeus console'
|
|
|
|
|
|
|
|
# Rspec
|
|
|
|
alias rs='rspec spec'
|
2012-11-14 00:50:29 +08:00
|
|
|
|
|
|
|
# Sprintly - https://github.com/nextbigsoundinc/Sprintly-GitHub
|
|
|
|
alias sp='sprintly'
|