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.

When you start using TextMate, you are instructed to create an alias for mate='open -a TextMate.app'. But now I am using another program that requires me to add it to the PATH. I'm not sure how to do it though. Can anyone help?

share|improve this question
add comment

4 Answers 4

up vote 7 down vote accepted

My TextMate installation includes Terminal Usage... item in the Help menu, that allows me to install a symlink in a directory of my choice, the default being /usr/local/bin. This seems to be the preferred way to do this, as it is accessible from within TextMate itself.

In TextMate2, the option is located under TextMate » Preferences… » Terminal.

share|improve this answer
add comment

mate is actually a utility that comes with TextMate. It is located at /Applications/TextMate.app/Contents/Resources/mate. The easiest way to add it to your path is to create a symlink to it:

ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate

Then add ~/bin to your path by adding the following line in your ~/.profile:

export PATH=$HOME/bin:$PATH

More details can be found in the TextMate Manual. Info such as this:

Mac OS X comes with an open shell command which can be used to simulate a double click from within Terminal. It can also perform an Open With… operation by use of the -a argument, e.g.: open -a TextMate . will open the current folder in TextMate (as a scratch project).

This standard command has a few shortcomings: it can only open one file at a time, it cannot open a document at a specific line and it cannot “stall” the shell until the file has been closed, which is useful e.g. when using an editor to write something like a subversion commit message.

For this reason TextMate comes with its own mate shell command, which supersedes the open command. For usage instructions you can run mate -h (from Terminal).

share|improve this answer
add comment

You can also check out the TextMate wiki: http://wiki.macromates.com/Troubleshooting/TextMateAndThePath

share|improve this answer
    
This is to change the PATH that is accessible to TextMate, not about how to put TextMate or mate in your PATH. –  fideli Oct 19 '10 at 23:21
add comment

you can add to your path in osx with the following command:

echo 'export PATH=YOURPATHHERE:$PATH' >> ~/.profile, replacing "YOURPATHHERE" 

obviously replacing 'YOURPATHHERE' with the path you need. This will add it to your profile so that every time you log it is set.

share|improve this answer
    
There's more needed here specifically for mate. See my post. –  fideli Oct 19 '10 at 23:21
add comment

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.