Does OSX Terminal close the current tab from the command line without a hint?

Looking for a way to close the current tab using the command line, I messed it up, but in the end I get an invitation. Do you really want to close what I would like to avoid. Here is my code,

osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "w" using command down'
+4
source share
1 answer

Why not used:

Terminal.app -> Preferences -> Settings -> Shell

and for elements:

"When the shell exists:" Close if the shell exited cleanly
"Prompt before closing:" Only if there are...." (or Never)
+5
source

All Articles