Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use MacBook Air with OSX 10.7.2 and TextMate Version 1.5.10 (1631).

If I type:

mate -w 1.txt

and then close TextMate, the shell doesn't return (i.e. I don't get the shell prompt back).

According to mate --help:

-w, --wait             Wait for file to be closed by TextMate.

Any ideas why -w option doesn't work as expected?

share|improve this question
    
It works for me on 10.7.2 / 1.5.10. Have you tried running it with default TextMate or terminal configurations? – user495470 Nov 23 '11 at 10:55
    
Just tried it 10.7.2/1.5.10: mate -w a.txt and indeed, it does not work - the prompt does not return when TextMate is closed. Seems like a bug to me. – Traveling Tech Guy Nov 23 '11 at 11:02
1  
This is actually the same question as "Alias that allows to edit ~/.bashrc and then “sources” it automatically - Why it doesn't work?". The only reason that things failed in that other question in the first place is that this behaviour occurs; and an answer to this question is an answer to that question as well. – JdeBP Nov 23 '11 at 12:02
    
@Lri: I run it with a default TextMate. – Misha Moroshko Nov 23 '11 at 19:15
    
Do you have this problem (and the bashrc problem JdeBP linked to) with a different user account on your machine? – Daniel Beck Jan 8 '12 at 22:20

I suspect it's because in 10.8 the document isn't truly closed if you do a cmd-Q and quit. I found that my normal behavior was to just quit after editing, but this leaves the document "open" and the command line doesn't return. If, however, you do a cmd-w (or close the window), it seems to work properly.

I "think" this is a result of Mtn. Lion's new "keep documents open between launches" feature.

share|improve this answer
1  
Only that Mountain Lion wasn't even released when this question was posted :) – slhck Oct 19 '12 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .