tmux splitw -t foo: Or use new -dP to get the session.
On 7 Nov 2016 9:23 pm, "Nick Clark" <[email protected]> wrote: > How can I setup windows in a new detached session, from within an existing > tmux session? > > My use case is a project dev environment setup script, something like this: > > #!/bin/sh > tmux new-session -s foo -d; > tmux switch-client -t foo; > tmux split-window -h; > > This will unexpectedly split the window of my original tmux session, not > the new one. If I run those commands one after another in the terminal > manually, it works as expected. > > Nick > > -- > You received this message because you are subscribed to the Google Groups > "tmux-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
