1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env bash if [[ "x$1" == x ]] ; then \tmux list-sessions &>/dev/null || { \tmux new-session -d } exec \tmux attach-session -d fi exec \tmux $@