寻找一种通过命令行关闭当前选项卡的方法,我对此进行了哈希处理,但最终得到了我想避免的是否真的要关闭的提示。这是我的代码,
osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "w" using command down'
最佳答案
为什么不使用:
Terminal.app -> Preferences -> Settings -> Shell
和项目:
"When the shell exists:" Close if the shell exited cleanly
"Prompt before closing:" Only if there are...." (or Never)
关于macos - OSX 终端在没有提示的情况下从命令行关闭当前选项卡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25734023/