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.

I am running Sublime Text 2 and OS X 10.7.5. Frequently, I will run a command from the Terminal and redirect the output so I can view it in Sublime. For example:

svn diff | subl

When I do this, I can see the output in Sublime, but I don't see the command prompt until I either close the output or press Ctrl+C. This is somewhat annoying. I would like the command prompt to come up immediately, like it does when piping output to TextWrangler. How can I do this? I am sure I can come up with a shell script or Python script to do it for me, but I am wondering if there is a simpler way, maybe involving some option built into Sublime.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Tell the shell to background the process when you launch it.

svn diff | subl &

The & makes all the difference.

share|improve this answer
    
Thank you. That does exactly what I want. I can't believe I didn't think of that. –  Elias Zamaria Feb 20 '13 at 19:19
    
I noticed some strange output after closing the file in Sublime: [1]+ Done ls -Gh | subl. Does anyone know what to do about that? –  Elias Zamaria Feb 20 '13 at 19:25
1  
That the shell's process control telling you that a background process (sublime in this case) has finished/terminated. If you wrapped the command in parens it will (should) eliminate the notification: (svn diff | subl &) –  SuperMagic Feb 20 '13 at 19:37
    
Thanks, @SuperMagic. Now it really does exactly what I want, as far as I can tell. –  Elias Zamaria Feb 20 '13 at 19:51

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.