Files
dotfiles/scripts/shell/tn.sh
2024-06-23 04:50:52 -03:00

12 lines
216 B
Bash
Executable File

#!/bin/bash
DIR_NAME=${PWD##*/}
tmux has-session -t $DIR_NAME 2>/dev/null
if [ $? -eq 1 ]; then
tmux new -s $DIR_NAME
else
echo "Session with current dirname was found. The script will exit now..."
exit 1
fi