Mac OS X/使用指定窗口打开终端 [英] Mac OS X / Open terminal with specified windows

查看:28
本文介绍了Mac OS X/使用指定窗口打开终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以打开带有 3 个选项卡的终端窗口.每个标签应该有不同的路径.

Is it possible to open a terminal window with 3 tabs. Each tab should have different path.

示例:

Tab1: /etc
Tab2: /bin
Tab3: /www/ tail -f file.txt

推荐答案

这绝对有可能,但需要您做一些工作.您需要做的第一件事是在设置"中设置您想要的每个窗口/标签:

This is absolutely possible, but it will take some work on your part. The first thing you need is to set up each window/tab you want in your Settings:

每次打开终端时我都会自动打开 4 个选项卡.DB ShellEditorServerShell.这些都在 Sasquatch(不要问)项目中,因此命名.然后,其中的每一个都应该有一个与之关联的唯一命令:

I have 4 tabs that I open automagically every time I open Terminal. DB Shell, Editor, Server, and Shell. These are all within the Sasquatch (don't ask) project, thus the naming. Each of these should then have a unique command associated with them:

在这种情况下,我正在执行 vim.如果你碰巧有一个想要开始的特定目录,你可以使用类似 vim ~/projects/main/ 的东西.实际上,无论您想输入什么,都是 shell 在打开时将执行的命令.现在您需要打开所有窗口/标签:

In this case, I'm executing vim. If you happen to have a specific directory you'd like to start off in, you can use something like vim ~/projects/main/. Really whatever you want to go in there is the command the shell will execute when it opens. Now you need to open all your windows/tabs:

  1. 关闭一切.
  2. 为您的每个个人资料打开一个新窗口.
    • 转到 Shell 菜单 => New Tab/New Window => 选择您在上面创建的配置文件.
    • 对您想要的每个窗口或标签重复.
  1. Close everything.
  2. Open a new window for each of your profiles.
    • Go to the Shell menu => New Tab/New Window => Select the profile you created above.
    • Repeat for each window or tab you want.
  • 转到 Window 菜单 => 将窗口另存为组....
  • 为您的窗口组命名(这对以后有帮助).
  • 如果您希望每次打开终端时都打开此组,请选中此屏幕底部的框,然后点击保存.
  • 转到 Window 菜单 => Open Window Group => 选择您刚刚创建的组.
  • Go to the Window menu => Open Window Group => Select the group you just made.

这应该会在同一位置弹出您刚刚拥有的所有窗口.您在 Settings 中设置的每个命令都应在各自的选项卡中启动.

This should pop up all the windows you just had, in the same position. Each of the commands you set up in Settings should be launched in their respective tabs.

这篇关于Mac OS X/使用指定窗口打开终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆