Finally I got it: Add this to your .bash_profile function foomagick() { rm -f ~/.foomagick.tmp ls /Applications/ | grep "\.app" | grep -v iWork | while read APP; do # clean it up a=`echo $APP | sed s/\ //g`; a=`echo $a | sed s/\'//g`; echo alias ${a%.*}="'open -a \"${APP%.*}\"'" >> ~/.foomagick.tmp done source ~/.foomagick.tmp rm ~/.foomagick.tmp } foomagick() Now the following work: Skim # open Skim.app Skim foo.pdf FireFox http://google.com FireFox google.com # ERROR. Looks for local file.