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 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
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

You must log in to answer this question.

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