Closed wahello closed 4 years ago
@wahello: exit
normally not just exits the process, but also closes the window / tab.
Are you thinking of scenarios where exiting the process (shell) doesn't close the window / tab?
I know that you can configure Terminal.app
to do the latter, but it's just as easy to turn that off.
Can you elaborate on when you think this would be useful?
In case you meant instructing ttab
to automatically close the new tab after a given command has finished:
For a single command, prepend exec
; e.g.:
ttab -t 'Will close when find finishes' exec find $HOME
For a multi-command command line; append ; exit
; e.g.:
ttab -t 'Will close when you press a key once finished' 'find $HOME; echo Press a key to exit.; read -rsn 1; exit'
It will get closer to perfect if ttab has function to close the opened tab/window.