【问题标题】:iterm2 after upgrade does not open up profiles升级后的 iterm2 不打开配置文件
【发布时间】:2016-07-18 19:58:16
【问题描述】:

我希望能够在命令提示符下输入 it2 myMachine 并弹出一个新会话,其中包含 Iterm2 中该配置文件的默认值。

以下内容在升级之前一直有效,其中 $1 是配置文件名称...

osascript <<ENDSCRIPT
on run argv
  tell application "iTerm"
    activate
    tell the first terminal
      launch session "$1"
    end tell
  end tell
end run
ENDSCRIPT

71:79:语法错误:应为类名,但找到了标识符。 (-2741)

我也在看 bash 中的直接 osascript。但是新标签没有得到命令。

osascript -e "tell application \"Terminal\""
     -e "tell application \"System Events\" to keystroke \"t\" using {command down}" 
 -e "do script \"cd $pwd; clear\" in front window"  
 -e  "end tell"

【问题讨论】:

  • 我在 iterm2 帮助页面上找到了所有... tell application "iTerm2" tell current window create tab with default profile end tell end tell 有许多标准的 Applescript 函数(例如,获取窗口的大小和位置),此处未记录。使用默认配置文件创建选项卡 使用配置文件“名称”创建选项卡

标签: macos applescript iterm


【解决方案1】:

我在 iterm2 帮助页面上找到了所有内容... 告诉应用程序“iTerm2” 告诉当前窗口 创建带有默认配置文件的选项卡 end tell end tell 有许多标准的 Applescript 函数(例如,获取窗口的大小和位置)不是记录在这里。使用默认配置文件创建选项卡 使用配置文件“名称”创建选项卡

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-08
    • 2016-03-22
    • 2016-07-16
    相关资源
    最近更新 更多