Alias Tip

alias for teh win! Didn't get into the habit until now because I thought saving a few keystrokes wasn't that beneficial. But damn it helps with a few edge cases and now I'm addicted.

In my ~/.profile:

# For managing encrypted FileVault containing my Rails products. # '-owners on' so the owner and groups can be set on files. alias mount_rails="hdiutil attach /Users/vwoo/Documents/Knox/rails.sparseimage -owners on" alias umount_rails="hdiutil detach /Volumes/rails" # alias now takes the place of bash scripts I made for several # server software installed through MacPorts. # Arguments work like bash scripts. $1 is the first argument etc. # so I can run 'apache start' and 'apache stop' alias apache="sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper $1" alias postgresql="sudo /opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper $1"
Misc. October 11, 2008 - 12:27PM. 0 Comments