1

I've tried several solutions on OS X Snow Leopard to get TextMate2 to recognise mate filename, but it appears there's no 'mate' for the mate command to call:

$cd /Applications/TextMate.app/Contents/SharedSupport/
$ ls -al
total 0
drwxr-xr-x  3 admin  staff  102  9 Jul  2012 .
drwxr-xr-x  9 admin  staff  306  9 Jul  2012 ..
drwxr-xr-x  3 admin  staff  102  9 Jul  2012 Bundles

$ which mate
/Users/admin/bin/mate

But the mate script (~/bin/mate) fails because 'Contents/Resources/mate' doesn't exist:

#!/bin/sh
exec "${TM_MATE:-$("$TM_SUPPORT_PATH/bin/find_app" com.macromates.TextMate.preview)/Contents/Resources/mate}" "$@"

...so mate myfile gives:

/Users/admin/bin/mate: line 2: /bin/find_app: No such file or directory
/Users/admin/bin/mate: line 2: /Contents/Resources/mate: No such file or directory
/Users/admin/bin/mate: line 2: exec: /Contents/Resources/mate: cannot execute: No such file or directory

I can't find a solution to this, after about 2 hours, so if anyone's come across the same issue I'd appreciate some help.

Dave Everitt
  • 17,193
  • 6
  • 67
  • 97

1 Answers1

3

I think the problem is that you've installed TextMate but have not yet enabled shell support via Terminal. Here's now to fix that with a few clicks.

  1. Open Text Mate and navigate to TextMate | Preferences.

  2. Select Terminal. You will probably see a message saying that Shell support has not yet been installed and that you will need both to install the mate shell command and to add a line to your .bashrc.

  3. Click the "Install" button to install the mate shell command.

  4. Copy the line below and paste it into your .bashrc.

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

  5. Close and re-open the Terminal and the "mate" command should now work as intended.

TechnoCat
  • 667
  • 8
  • 16
  • Thanks, I've already done that, checked my path, and looked at setting up symlinks manually. But the issue is that there's no 'mate' in the TextMate installation itself. Apparently although Snow Leopard is no longer supported Macromates suggested I download a later version... – Dave Everitt Jan 09 '14 at 08:30