Reputation: 17871
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.
Upvotes: 1
Views: 1269
Reputation: 684
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.
Open Text Mate and navigate to TextMate | Preferences.
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.
Click the "Install" button to install the mate shell command.
Copy the line below and paste it into your .bashrc.
export EDITOR="/usr/local/bin/mate -w"
Close and re-open the Terminal and the "mate" command should now work as intended.
Upvotes: 3