【发布时间】:2016-06-07 20:56:47
【问题描述】:
我正在尝试重命名 OSX 中打开的终端选项卡,但我只能使用以下代码更改终端标题。有没有办法用命令改变标签标题?我在 python 2.7 中使用 osascript。
name = """osascript -e 'tell application "Terminal" to set custom title in selected tab of the front window to "script_1"'"""
os.system(name)
手动:Shell > 编辑标题(SHIFT+COMMAND+I) > Tab Title
【问题讨论】:
标签: python macos shell terminal osascript