diff --git a/script/tmuxsess b/script/tmuxsess index 39563be..172dbb1 100755 --- a/script/tmuxsess +++ b/script/tmuxsess @@ -2,10 +2,17 @@ # # Open a new tmux session named after the current directory with a basic # development/editing environment. +# +# The session will be named after the current directory unless the desired name +# is passed as the only argument. set -e -cwd=$(pwd) -sessionname=$(basename $cwd) +if [ -z "$1" ]; then + cwd=$(pwd) + sessionname=$(basename $cwd) +else + sessionname="$1" +fi tmux new -d -s $sessionname tmux rename-window -t $sessionname:1 cli tmux new-window -t $sessionname -n vim vim