On OS X, you can easily open a .app from the command line by typing: 'open /Applications/TextEdit.app/', where the arg is the location of your file.

This has been a public service announcement, after discovering that neither jilldaw nor sbp knew how to do it! .

The application is typically contained in Foo.app/Contents/MacOS/commandname, but that's not universal: mplayer is sometimes packaged such that the actual binary is in MPlayer.app/Resources/mplayer.app/MacOS/mplayer , and you can't even tab complete the last step! I've never understood why that is, but I guess mplayer is probably non-trivial to package and put a frontend on at the same time.

That is all.