我是tmux + tmuxinator的忠实粉丝。最近购买我发现自己正在使用不同的会话,尽管我配置了tmuxinator,但我仍然需要每天打开一个。
有没有办法一次打开两个或更多会话,所以我可以在启动tmux tmuxinator后立即在它们之间导航?
答案 0 :(得分:1)
查看我写的这个小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