When I want to close a window I type exit :
mbp-thomas in ~
○ → exit
Then cmd + w to close the window.
Is there a way to do it with a little script like if I type quit it exit the session then close the window ?
Go to Terminal → Preferences….
Select the Settings tab, then your profile, and choose the Shell tab.
Set When the shell exits to Close if the shell exited cleanly.
Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).
You could also simply quit Terminal by using Cmd+Q
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
8 months ago