3

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.

quack quixote
  • 43,504
nonopolarity
  • 9,886

4 Answers4

10

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.

Josh K
  • 12,990
3

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.

squircle
  • 6,773
2

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
user46046
  • 1,331
0

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

Miro A.
  • 245