gpt4 book ai didi

macos - OSX 终端在没有提示的情况下从命令行关闭当前选项卡?

转载 作者:行者123 更新时间:2023-12-04 18:41:16 24 4
gpt4 key购买 nike

寻找一种通过命令行关闭当前选项卡的方法,我对此进行了哈希处理,但最终得到了我想避免的是否真的要关闭的提示。这是我的代码,

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com