Applescript 没有 运行 用户命令

Applescript does not run user command

我需要 applescript to 运行 tabset test 命令来更改 iTerm 当前选项卡的名称。

-- Launch iTerm and log into multiple servers using SSH
tell application "iTerm"
    activate
    create window with default profile
    set newWindow to (create window with default profile)
    set Servers to paragraphs of (do shell script "/bin/cat $HOME/serverlist")
    repeat with nextLine in Servers
        if length of nextLine is greater than 0 then
            tell current window
                create tab with default profile
                tell current session of newWindow

                    do shell script "export PATH='/usr/local/bin:$PATH'; tabset test "

                end tell
            end tell
        end if
    end repeat
    tell first tab of current window
        close
    end tell
    tell second window
        close
    end tell
end tell

问题是tabset test不起作用,也没有任何错误提示。

tabset 命令可以通过 npm install -g iterm2-tab-set

安装

Ted Wrigley 是对的。我应该使用 iTerm 的 write 命令将文本键入 window.