Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MacOS终端设置脚本_Macos_Terminal_Automation - Fatal编程技术网

MacOS终端设置脚本

MacOS终端设置脚本,macos,terminal,automation,Macos,Terminal,Automation,有没有办法自动设置MacOS终端窗口 它应该打开几个选项卡,重命名其中的一些选项卡,转换到文件夹,启动其他脚本(例如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 sty

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

它应该打开几个选项卡,重命名其中的一些选项卡,转换到文件夹,启动其他脚本(例如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
#/bin/bash

osascriptStart
终端
并打开一些新窗口,然后转到
窗口->将窗口另存为组