MacOS 终端设置脚本

MacOS Terminal Setup Skript

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

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

可能像这样:

#!/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