【发布时间】:2016-08-01 06:35:02
【问题描述】:
我使用的是 Iterm2 版本 Build 3.0.4 我想创建别名以从命令行打开新选项卡(在 bash 中) 我试过这段代码:
function tab () {
osascript &>/dev/null <<EOF
activate application "iTerm"
tell application "System Events" to keystroke "t" using command down
tell application "iTerm" to tell session -1 of current terminal to write text "pwd"
EOF
}
但它不起作用。谁能解决这个版本(或更新版本)的问题?
【问题讨论】: