#!/bin/bash tmux=tmux tmux_opts= session_opts= while getopts ":T:n:s:t:" opt; do case $opt in T) tmux="$OPTARG";; n|s|t) session_opts="$session_opts -$opt $OPTARG";; esac done shift $((OPTIND-1)) exec $tmux ${tmux_opts## } new-session ${session_opts## } -d ';' attach ';' run-shell ktmux_helper