bash/available/tmux_local.sh

11 lines
229 B
Bash
Executable File

#!/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