Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried and the only way seemed like typing in

/Applications/TextEdit.app/Contents/MacOS/TextEdit

in a bash shell. But even when I close the application, it is not considered an exit. I need to go to the app icon on the dock and click "Quit" so that it will exit.

Any other way to invoke and exit it? thanks.

share|improve this question
1  
Multi-document applications (like TextEdit) do not automatically quit even if all of their windows have been closed. So, if you mean “close all the application’s windows” when you say “close the application”, that would explain why you do not see it exit at the shell. Switch to the application and use its Quit menu item (usually, ⌘Q). –  Chris Johnsen Jun 11 '10 at 3:40

4 Answers 4

You can use mate [file] to open it from the shell.

This does require that you link this, but it's fairly easy and I believe it might already be an option in the preferences. Just checked, go to "Help" -> "Terminal Usage" in the menubar.

You can also use mate . (note the .) to open the entire current folder as a project in TextMate.

share|improve this answer
1  
Brilliant stuff~ :) –  gideon Nov 14 '12 at 15:01

I'd read the MacRumours guide for open, namely running open -e file.txt to open the file with TextEdit, and (if you have set TextWrangler as the default for .txt files) open -t file.txt to open it with TextWrangler (or whatever you have set the default program to). If you're looking to set the default for a file type, see this question.

share|improve this answer
1  
Besides TextEdit and the default text editor, open can also launch any application by name : open -a 'AppleScript Editor' and open -a 'QuickTime Player' some_media_pathname. –  Chris Johnsen Jun 11 '10 at 3:43

open your .bash_profile using for example:

nano ~/.bash_profile

at the end of the file paste the following:

# TextMate
o(){
open $1 -a textmate.app
}

reload your profile:

source ~/.bash_profile

usage:

o myfile.txt
share|improve this answer

For TextMate, just type 'mate filename' in shell. Directory name works too.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.