#! /usr/bin/env sh session="$1" cmd="$2" tmux new -s $session -d tmux send-keys -t $session "$cmd && exit" C-m tmux attach -t $session