#!/bin/sh # if [ -z "$TMUX" ]; then if tmux attach -t $(tmux ls | grep -v attached | head -1 | cut -f1 -d:) || tmux; then exit else echo "Error while exicuting tmux. Check if tmux is installed" fi fi