Celeb Glow
updates | February 28, 2026

Setting up the "mate" command in bash

Attempting to setup bash so I can call the "mate" command to edit text files. After running this line, the link appears to exist but I'm still getting "mate: command not found"

ln -s /Applications/ ~/bin/mate/mate
  • Textmate is installed in applications
  • using OSX Mountain Lion
  • directory structure is in place
1

4 Answers

You need to install the shell support in textmate preferences. Follow these steps.

  • Open textmate
  • Open Preferences via your top menu TextMate > Preferences or pressing Command + ,
  • Click on Terminal tab
  • Click the install button

note: This will install the command line support to your bash file by default. If you are not using bash, you'll need to add the following line to your shell or select the correct path from the dropdown menu. Once you reload your terminal, this will load the path to the EDITOR variable.

export EDITOR="/usr/local/bin/mate -w"

make sure you reload your shell config by using source like this

source ~/.bashrc

check that your EDITOR variable has been loaded with this command

echo $EDITOR

Don't know what shell you are using? You can use the echo command to show the result of your $SHELL variable like this

echo $SHELL
1

Try this:

alias mate='/Applications/

Put it in your ~/.bashrc file if you want to use it in every terminal session.

I have a feeling that the problem with your symlink solution is that ~/bin is in your PATH, but ~/bin/mate/ is not, so try alternatively:

ln -s /Applications/ ~/bin/mate

Edit:

Removed the tilde before Applications, Applications is in the root not in the home directory.

7

Just tried this and it worked fine for me on Mac OS X (Mountain Lion) and TextMate (1.5.11 r1635) installed in Applications.

It seems like you no longer need to create aliases/symbolic links to access the TextMate shell utility from command line. Instead, mate by default is installed in /usr/bin.

In Terminal, go to /usr/bin and list the files there. Do you see mate over there? If not, check /usr/local/bin.

If you didn't see mate in either of the folders above, try removing and installing again. I just tried a fresh installation and mate worked out of the box for me.

I don't know anything about OSX, but I think you should move that to ~/bin/mate instead of ~/bin/mate/mate. If the system put it there, use this:

ln -s ~/bin/mate/mate ~/bin/mate

else just move it:

mv ~/bin/mate/mate ~/bin/mate

You should also check your PATH. If you didn't already know, the PATH tells the system what executables to execute.

PATH="~/bin:$PATH"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy