简体   繁体   English

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

[英]OSX Terminal close current tab from command line without prompt?

Looking for a way to close the current tab via the command line, I hashed this out, but end up getting a prompt for Do you really want to close which I would like to avoid. 想要找到一种通过命令行关闭当前选项卡的方法,我将其删除了,但最终获得了提示您是否真的要关闭我想要避免的。 Here's my code, 这是我的代码,

osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "w" using command down'

Why didn't use the: 为什么不使用:

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

and for the items: 对于项目:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM