Finally I got it: Add this to your .bash_profile
function foomagick() {
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%.*}\"'"
done
}
foomagick > foomagick.tmp
source foomagick.tmp
rm foomagick.tmp
Now the following work:
Skim # open Skim.app
Skim foo.pdf
FireFox http://google.com
FireFox google.com # ERROR. Looks for local file.