add the old snippet md files

This commit is contained in:
Travis Shears 2025-06-05 16:20:57 +02:00
parent fc0dd204c7
commit bcf8313a4b
110 changed files with 3048 additions and 0 deletions

View file

@ -0,0 +1,14 @@
---
title: "automatic tmux session names"
date: 2020-07-13T11:38:52+02:00
draft: false
snippet_types: ["tmux"]
---
This month I ditched [XQuartz](https://www.xquartz.org/) 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`
```bash
alias tmux_new="tmux new -s \$(pwd | awk -F "/" '{print \$NF}' | sed 's/\./_/g')"
```