Michael Fischer <mich...@dynamine.net> writes:

> 2) I'm currently bookending my script with "new-session; <split-window
> CMD foreach server>; kill-pane -t 0" but this feels inelegant, any
> suggestions on how to improve this?

Create the first pane in new-session. For reference, my own simple script
to do this:

#!/bin/sh
# Usage: tmux-cssh user1@host1 user2@host2 host3 host4 host5 host6 [...]
SESSION=cssh-$$
tmux new -d -s $SESSION "exec ssh $1"
shift
for host in $*; do
    tmux splitw -t $SESSION "exec ssh $host"
    tmux selectl -t $SESSION tiled >/dev/null
done
tmux setw -t $SESSION status off >/dev/null
tmux setw -t $SESSION synchronize-panes on >/dev/null
exec tmux attach -t $SESSION

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to