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.

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/TextMate.app/Contents/Resources/mate ~/bin/mate/mate
  • Textmate is installed in applications
  • using OSX Mountain Lion
  • directory structure is in place
share|improve this question

migrated from stackoverflow.com Oct 18 '12 at 8:58

This question came from our site for professional and enthusiast programmers.

    
Is it really ~/bin/mate/mate? I'd expect that to be ~/bin/mate –  themel Oct 17 '12 at 20:55

2 Answers 2

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.

share|improve this answer

Try this:

alias mate='/Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate'

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/TextMate.app/Contents/SharedSupport/Support/bin/mate ~/bin/mate

Edit:

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

share|improve this answer
    
not having any luck with those suggestions. It's been suggested that I add this: 'export EDITOR="mate -w" export PATH=~/bin:$PATH' to my .bashrc, but that's not workin either. –  Brendan Biryla Oct 17 '12 at 19:41
    
Did you source ~/.bashrc after adding in the new lines? Also, what is the actual path to launch Textmate from the command line in your environment? (i.e. where is the binary actually stored?) –  sampson-chen Oct 17 '12 at 19:49
    
Apologies, i'm a bit of a noob on this. I'm attempting part 2 of the bash course on peepcode.com and the instructor uses the "mate" command in his tutorials while setting up his environment so I'm attempting to set mine up so I can mimic his actions... I punched 'source ~/.bashrc' into the command line (and also refreshed the terminal window) and then attempted to use the mate command on the known location of a text file. Is that what you meant for me to do? Also, I think the binary location is here: /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate –  Brendan Biryla Oct 17 '12 at 20:49
    
Try the updated answers. Also try to see if you can launch the application from commandline with: ~/Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate –  sampson-chen Oct 17 '12 at 20:53
    
~/Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate failed too, (No such file or directory) but The program works when i open it from dock or finder... strange –  Brendan Biryla Oct 17 '12 at 21:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.