bash aliases

I use the standard shell in OS X which is bash. A while back I learned about aliases and got hooked. Now I have bash aliases all over my workflow.

Some are specific to my work or projects, though most are not. I’m sure some of these could be a little better here and there, but I’m pretty happy with the state of things.

If you have any good ones that I would like send them over in the comments.

So without further Apu, here is my .bash_login contents.

# path and shell vars
  export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
  export P4CONFIG=.p4config
  export SVN_EDITOR="mate -w"

# unix navigating
  alias home="cd ~"
  alias la='ls -la'
  alias ll='ls -l'
  alias ..='cd ..'
  alias ...='cd ../..'
  alias o='open .'

# rails
  alias ss='./script/server'
  alias sse='./script/server -e live'
  alias mig='./script/generate migration'
  alias gen='./script/generate '
  alias scaf='./script/generate scaffold_resource'
  alias con='./script/console'
  alias mod='./script/generate model'
  alias cont='./script/generate controller'
  alias dbm='rake db:migrate'
  alias cl='rake log:clear'
  alias ann='rake annotate_models'
  alias fix='rake db:fixtures:load'
  alias nuke='rake app:db:nuke'

# misc
  alias sgi='sudo gem install'
  alias c="cheat"
  alias mydb='mysqladmin -u root create'
  alias a='autotest'
  alias comics='ruby /Users/s/scripts/the_dreaming/new_comics.rb'
# adready
  alias live='rake live:data:update'
  alias dbml='rake db:migrate RAILS_ENV=live'
  alias adready='sup; rake db:remigrate; rake db:remigrate RAILS_ENV=live; dbm; rake db:test:prepare; live'

# merb
  alias mmig='./script/new_migration'

# textmate
  alias sub="mate app config db public test spec"
  alias subb="mate app config test spec"
  alias app="mate app public test"
  alias m="mate"
  alias e='mate . &'
  alias table="ruby ~/scripts/table_maker.rb"

# bash profile
  alias ebash='mate ~/.bash_login &'
  alias rbash='source ~/.bash_login'

# go to my projects
  alias work="cd ~/work"
  alias ven="cd ~/work/vendo"
  alias vent="cd ~/work/vendo/trunk"
  alias w3="cd ~/work/vendo/branches/wave_3"
  alias w3="cd ~/work/vendo/branches/wave_4"

# git
  alias gpl="git pull"

# svn
  alias sst='svn st'
  alias sci='svn ci'
  alias scim='svn ci -m'
  alias sad='svn status | grep "^\?" | awk "{print \$2}" | xargs svn add'
  alias sup="svn up"
  alias srm="svn rm"