Helper function to start new tmux session with the name of current directory
There are many promising tools that helps with bootstrapping tmux sessions, but this simple function, originally shared by Chris Toomey from thoughtbot, beat them all :)
1 2 3 4 5 6 7 8 9 10 |
|
Once added to ~/.zshrc
or ~/.bashrc
, etc., you can start new tmux session
as simply as typing the following:
> tn
And it will take the name of current directory.
Enjoy!