2011-11-18 05:45:33 +08:00
|
|
|
# PS
|
|
|
|
alias psg="ps aux | grep $1"
|
|
|
|
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 1'
|
|
|
|
|
|
|
|
# show me files matching "ls grep"
|
|
|
|
alias lsg='ll | grep'
|
|
|
|
|
|
|
|
# Alias Editing
|
|
|
|
alias ae='vi ~/dev/config/bash_aliases' #alias edit
|
|
|
|
alias ar='. ~/dev/config/bash_aliases' #alias reload
|
|
|
|
|
|
|
|
# Bash Options Editing
|
|
|
|
alias boe='vi ~/dev/config/bash_options'
|
|
|
|
alias bor='. ~/dev/config/bash_options'
|
|
|
|
|
|
|
|
# .bash_profile editing
|
|
|
|
alias bp='vi ~/.bash_profile'
|
|
|
|
alias br='. ~/.bash_profile'
|
|
|
|
|
2011-11-19 05:30:16 +08:00
|
|
|
# vimrc editing
|
|
|
|
alias ve='vi ~/.vimrc'
|
|
|
|
|
|
|
|
# zsh profile editing
|
|
|
|
alias ze='vi ~/.zshrc'
|
|
|
|
alias zr='. ~/.zshrc'
|
|
|
|
|
2011-11-18 05:45:33 +08:00
|
|
|
# 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'
|
2011-11-23 03:23:59 +08:00
|
|
|
alias guns='git unstage'
|
|
|
|
alias gunc='git uncommit'
|
2011-11-18 05:45:33 +08:00
|
|
|
alias gm='git merge'
|
|
|
|
alias gms='git merge --squash'
|
|
|
|
alias gam='git amend'
|
|
|
|
alias gr='git rebase'
|
|
|
|
alias gra='git rebase --abort'
|
|
|
|
alias grc='git rebase --continue'
|
|
|
|
alias gbi='git rebase --interactive'
|
|
|
|
alias gl='git log'
|
|
|
|
alias glg='git log'
|
|
|
|
alias glog='git log'
|
|
|
|
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 gps='git push'
|
|
|
|
alias gpsh='git push'
|
|
|
|
alias gnb='git nb' # new branch aka checkout -b
|
2011-11-22 05:01:32 +08:00
|
|
|
alias grs='git reset'
|
|
|
|
alias grsh='git reset --hard'
|
2011-11-18 05:45:33 +08:00
|
|
|
|
|
|
|
# Common bash functions
|
|
|
|
alias less='less -r'
|
|
|
|
alias tf='tail -f'
|
|
|
|
alias l='less'
|
|
|
|
alias lh='ls -alt | head' # see the last modified files
|
|
|
|
alias fn="find . -name"
|
|
|
|
alias screen='TERM=screen screen'
|
2011-11-23 03:23:59 +08:00
|
|
|
alias cl='clear'
|
2011-11-18 05:45:33 +08:00
|
|
|
|
|
|
|
# Zippin
|
|
|
|
alias gz='tar -zcvf'
|
|
|
|
|
|
|
|
# Ruby
|
|
|
|
alias irb='pry'
|
|
|
|
alias c='script/console --irb=pry'
|
|
|
|
alias ms='mongrel_rails start'
|
|
|
|
|
2011-11-23 03:23:59 +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 *'
|
2011-11-18 05:45:33 +08:00
|
|
|
|
|
|
|
alias ka9='killall -9'
|
|
|
|
alias k9='kill -9'
|
|
|
|
|
|
|
|
# This trick makes sudo understand all my aliases
|
|
|
|
alias sudo='sudo '
|
|
|
|
|
|
|
|
# Gem install
|
|
|
|
alias sgi='sudo gem install --no-ri --no-rdoc'
|
2011-11-19 02:53:07 +08:00
|
|
|
|
|
|
|
# TODOS
|
|
|
|
# This uses NValt (NotationalVelocity alt fork) - http://brettterpstra.com/project/nvalt/
|
|
|
|
# to find the note called 'todo'
|
|
|
|
alias todo='open nvalt://find/todo'
|