13 lines
181 B
Bash
Executable File
13 lines
181 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 -d
|
|
tmux attach -t $DIR_NAME
|
|
else
|
|
tmux a -t $DIR_NAME
|
|
fi
|