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.
|
|
|
|
yadr=`find -L ~ -type file -maxdepth 2 -name .yadr | head | sed 's:\.yadr\/::'`
|
|
|
|
|
|
|
|
# YADR support
|
|
|
|
alias yav='yadr vim-add-plugin'
|
|
|
|
alias yuv='yadr vim-update-plugins'
|
|
|
|
alias yip='yadr init-plugins'
|
|
|
|
|
|
|
|
# PS
|
|
|
|
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
|
|
|
|
alias vim=$(brew ls macvim | grep Contents/MacOS/Vim)
|
|
|
|
|
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'
|
|
|
|
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'
|
|
|
|
alias ga='git add -A'
|
|
|
|
alias guns='git unstage'
|
|
|
|
alias gunc='git uncommit'
|
|
|
|
alias gm='git merge'
|
|
|
|
alias gms='git merge --squash'
|
|
|
|
alias gam='git amend'
|
|
|
|
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'
|
|
|
|
alias gdc='git diff --cached'
|
|
|
|
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
|
|
|
|
alias grs='git reset'
|
|
|
|
alias grsh='git reset --hard'
|
|
|
|
alias gcln='git clean'
|
|
|
|
alias gclndf='git clean -df'
|
|
|
|
alias gsm='git submodule'
|
|
|
|
alias gsmi='git submodule init'
|
|
|
|
alias gsmu='git submodule update'
|
|
|
|
alias gt='git t'
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
alias ps='ps aux'
|
|
|
|
|
|
|
|
# Zippin
|
|
|
|
alias gz='tar -zcvf'
|
|
|
|
|
|
|
|
# Ruby
|
|
|
|
alias c='script/console --irb=pry'
|
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'
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
|