我是 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/