Quitting OS X Terminal Windows
When working with the terminal application on OS X, I find myself wanting the functionality I have on Linux and Windows terminals/consoles. When I type 'exit' into the terminal, I want it to terminate all the way.
The OS X Terminal app doesn't do this automatically. It closes the window, yes, but it doesn't close the application for you. I looked at several solutions online, but didn't want to install anything new and didn't want to jump through 50 hoops.
So my solution is to add an alias to my ~/.bash_profile file. When you add this alias, you get in the habit of typing 'quit' when you want to be completely done with the Terminal application. Add the following to your ~/.bash_profile (or whatever shell you use):
quit='osascript -e "tell application \"Terminal\" to quit"'
Once added and you get in the habit of typing 'quit' when you want to close all Terminal windows, it makes life much easier. I can still type exit on individual windows, it doesn't monkey with any settings, and it's a simple one-liner. Enjoy!