I have a tmux script to create nested tmux sessions
#!/bin/env tcsh
set SESSION=$1
set NESTED_SESSION=$2
\tmux -2 new-session -d -s ${SESSION}
\tmux send-keys "unsetenv TMUX" C-m
\tmux send-keys "\tmux -2 new-session -s ${NESTED_SESSION}" C-m
#i want some commands in the nested session
\tmux attach-session -t ${SESSION}
How do I pass the commands to the nested session. If i use send-keys they go to the original session and not the nested session.
Thanks in Advance