Automatic tmux session names - 07-13-20

This month I ditched XQuartz and am back to using Tmux. One part I found tedious was manually naming sessions. I wrote this little alias help. When run from outside a tux session to creates a new session named after the current directory. Ex when in /users/t.shears/dev/cool-app a session named cool-app is created.

Excerpt from my .zshrc

alias tmux_new="tmux new -s \$(pwd | awk -F "/" '{print \$NF}' | sed 's/\./_/g')"
\- [ tmux ]