[Pythonmac-SIG] Unix-amateur question

Ed Leafe ed at leafe.com
Wed Mar 8 02:23:12 CET 2006


On Mar 7, 2006, at 8:05 PM, Charles Hartman wrote:

> How do I execute a Mac application from the Terminal command line?

	For most apps, simply type 'open <name of app>', including any  
necessary pathing. Keep in mind that Cocoa apps are actually bundles,  
which means that the file name usually has .app at the end. For  
example, to open Safari from the Terminal, type: open /Applications/ 
Safari.app/

> Specifically, I'm trying to specify BBEdit in the EDITOR environment
> variable which is consulted by IPython. EDITOR= what? Not /
> Applications/BBEdit, or /Applications/BBEdit.app. Probably something
> that continues with /Contents/ . . . but then I get lost. And I don't
> quite know how to experiment because I'm not sure how to attempt to
> run it from the bash prompt . . .

	This is even easier! BBEdit has a command-line tool that you can  
install from the 'Tools' section of the preferences. The tool's name  
is 'bbedit' (lower case), so from the Terminal you can simply type  
'bbedit myfile', and 'myfile' will be opened up in BBEdit. For your  
environmental variable, just set: EDITOR=bbedit

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com





More information about the Pythonmac-SIG mailing list