In my text editor, I have bound a shortcut key to deploy my code by invoking a command like

/usr/bin/open /Users/blahblah/run_deploy

That deploy script uploads my code to my server etc. I am using "open" so that I can see the output in a new terminal window in case there are any errors. Very convenient, but in the end it leaves the terminal window open with text "[Process completed]".

Any way to skip this and instead just automatically close the window?

Terminal process completed

link|improve this question

1  
Give that you've set Terminal to close the window when the shell exits, it sounds like a Terminal issue. Have you tried deleting the preference file com.apple.Terminal.plist from your Preferences folder and tried setting it again? – Chealion Jul 9 '10 at 18:47
Do you still have this problem? – Daniel Beck Dec 9 '10 at 12:50
feedback

1 Answer

up vote 7 down vote accepted

In Terminal Preferences, in Settings pane select scheme you use, select sub-pane Shell and change «When the shell exits» to «Close if the shell exited cleanly». Though it will not hide [Process completed] message, but will close the window if exit code was successful.

link|improve this answer
For some reason I cannot change the settings in that terminal window. If I change them in another terminal window and "use as default", still they are not used in the new terminal window. Here's what the new terminal window looks like: i.imgur.com/u3tk4.png – user16145 Jul 6 '10 at 12:34
First to make testing faster run following: echo 'say hello' > test; chmod +x test (it will create executable which will say hello), running open test or double-clicking it in finder will run it with terminal by default. On your screenshot none of schemes is selected (don't know how, I can't unselect all of them), so select Basic as it is marked «Default», and set closing setting, then try running script. – tig Jul 6 '10 at 17:57
Thanks, but that also didn't work: i.imgur.com/cCo49.png – user16145 Jul 8 '10 at 3:36
Which os version do you use (don't know if it can be related, I use 10.6.4)? Maybe this is due unread mail? Try using mail to read it. Maybe something wrong with logout? Do you have ~/.bash_logout file, if yes, what is inside? Try running bash -c exit && echo 'ok' — you should see 'ok', also try just run exit in new shell — it should close the window. Do you use window groups? i.imgur.com/thPNV.png – tig Jul 9 '10 at 14:56
Could you put a "killall Terminal" command at the end of your script or something? I know that'll close the window no matter what, but you can at least watch what's going on DURING the script's run (and you could also push the output to a log, just in case). – jrc03c Jul 12 '10 at 20:33
show 2 more comments
feedback

Your Answer

 
or
required, but never shown

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