ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  PHP with Apple's Developer Tools
Subject:   Using 'open'
Date:   2002-11-29 09:21:56
From:   anonymous2
The /usr/bin/open command defaults to using either a Finder creator or the file's extension (if the Creator isn't set in the desktop database) to decide which application to invoke. This can be a pain for files with extensions other than those that are in Project Builder's plist.


Fortunately, open has a -a switch that allows you to specify the application. For example:


open -a /Developer/Applications/Project\ Builder.app somefile.php


will open somefile.php in Project Builder. I do this so often that I have an alias in my .rc file:


alias openpb 'open -a /Developer/Applications/Project\ Builder.app'


One can use a similar trick for opening files in BBEdit (yes, I have an 'openbb' alias as well) or just about any other editor you want to use (so long as the editor responds to the Open AppleEvent).


1 to 1 of 1
  1. Using 'open'
    2002-12-04 07:20:58  charlesa1 [View]

1 to 1 of 1