584 B
584 B
| title | date | draft | snippet_types | |
|---|---|---|---|---|
| automatic tmux session names | 2020-07-13T11:38:52+02:00 | false |
|
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')"