Isso corrige a criação de 2 ou 3 painéis de janela:
#!/bin/bash
SESSION=$2
case $1 in
start)
echo "starting session"
if [ $3 == "two" ]; then
echo "Creating 2 window pane"
tmux new -session -d -s $SESSION
tmux new-window -t $SESSION:2 -n 'two'
tmux select-window -t $SESSION:2
tmux split-window -h
tmux attach -t $SESSION
elif [ $3 == "three" ]; then
echo "Creating 3 window pane"
tmux new -session -d -s $SESSION
tmux new-window -t $SESSION:3 -n 'three'
tmux select-window -t $SESSION:3
tmux split-window -h
tmux split-window -h
tmux attach -t $SESSION
fi
;;
stop)
echo "stop session"
;;
*)
echo "Wooot!"
;;
esac
Para o quarto parâmetro, você pode tentar:
tmux send-keys "cd ${4}" Enter