【问题标题】:MacOS Terminal Setup SkriptMacOS 终端设置脚本
【发布时间】:2015-10-10 20:16:13
【问题描述】:

有没有办法自动设置 MacOS 终端窗口?

它应该打开一些标签,重命名其中一些,转换到文件夹,启动其他脚本(例如 mongod)等等。

【问题讨论】:

  • 启动Terminal并打开一些新窗口然后转到Window->Save Windows as a Group

标签: macos terminal automation


【解决方案1】:

可能是这样的:

#!/bin/bash
osascript<<EOF
tell application "Terminal"
    set newTab1 to do script "cd /etc && ls && echo && echo I am in /etc and in Ocean style"
    set current settings of newTab1 to settings set "Ocean"
    set newTab2 to do script "cd $HOME/Desktop && ls && echo && echo I am on your Desktop and in Man Page style"
    set current settings of newTab2 to settings set "Man Page"
end tell

【讨论】:

    猜你喜欢
    • 2019-11-11
    • 1970-01-01
    • 1970-01-01
    • 2022-06-23
    • 2017-01-15
    • 2012-10-28
    • 1970-01-01
    • 1970-01-01
    • 2017-07-18
    相关资源
    最近更新 更多