【发布时间】:2014-11-02 05:58:45
【问题描述】:
寻找一种通过命令行关闭当前选项卡的方法,我对此进行了散列,但最终得到了 Do you really want to close 的提示,这是我想避免的。这是我的代码,
osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "w" using command down'
【问题讨论】:
寻找一种通过命令行关闭当前选项卡的方法,我对此进行了散列,但最终得到了 Do you really want to close 的提示,这是我想避免的。这是我的代码,
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)
【讨论】:
Preferences -> Profiles -> Shell