OSX终端从命令行关闭当前选项卡没有提示?

ehi*_*ime 5 macos terminal tabs

想要找到一种通过命令行关闭当前选项卡的方法,我将其删除了,但最终获得了提示您是否真的要关闭我想要避免的.这是我的代码,

osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "w" using command down'
Run Code Online (Sandbox Code Playgroud)

jm6*_*666 6

为什么不使用:

Terminal.app -> Preferences -> Settings -> Shell
Run Code Online (Sandbox Code Playgroud)

对于项目:

"When the shell exists:" Close if the shell exited cleanly
"Prompt before closing:" Only if there are...." (or Never)
Run Code Online (Sandbox Code Playgroud)