MacOS Terminal Setup Skript

跟風遠走 提交于 2019-12-11 14:32:45

问题


Is there a way to automatically setup a MacOS Terminal Window?

It should open a few tabs, rename some of them, transition to folders, launching other scripts (e.g. mongod) etc.


回答1:


Like this maybe:

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



来源:https://stackoverflow.com/questions/33033606/macos-terminal-setup-skript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!