tmux - 如何同时启动两个或多个 tmux(或 tmuxinator) session ?

标签 tmux tmuxinator

我是 tmux + tmuxinator 的 super 粉丝。最近购买时,我发现自己正在使用不同的 session ,尽管我使用 tmuxinator 配置了它们,但我仍然需要每天一次打开一个 session 。

有没有办法同时打开两个或多个 session ,以便我一启动 tmux 或 tmuxinator 就可以在它们之间导航?

最佳答案

看看我写的这个小 mac os 脚本:

#!/bin/bash
sessions=( session1 session2 )
for i in "${sessions[@]}"
do
osascript <<EOF
  tell application "iTerm" to activate
  tell application "System Events" to tell process "iTerm" to keystroke "t" using command down
  tell application "System Events" to tell process "iTerm" to keystroke "tmuxinator start ${i}"
  tell application "System Events" to tell process "iTerm" to key code 52
EOF
done

关于tmux - 如何同时启动两个或多个 tmux(或 tmuxinator) session ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37795912/

相关文章:

linux - 可以 tmux Pane 远程 ssh 连接

shell - 在另一个 tmux session 中打开 tmux session 时如何发送命令?

tmux - 在 os x lion 上安装新的 tmux 返回 "git: Permission denied"

tmuxinator 使用多个命令初始化 Pane

terminal - Tmuxinator Pane 代码不起作用

tmux - 如何在 tmux 启动时创建布局并运行命令?

putty - tmux 和多个 PuTTY/KiTTY session

tmux - 将参数传递给 tmuxinator 项目文件

vim - 当我在插入模式下按 ESC 时 Tmux 崩溃,如何解决?

tmux - 如何使用 tmuxinator 设置 Pane 标题