Alias Tip

Posted by Vincent Woo Sun, 12 Oct 2008 02:27:00 GMT

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"

Posted in  | Tags , , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://www.undefinedrange.com/trackbacks?article_id=alias-tip&day=11&month=10&year=2008

Comments are disabled