Tmux. Change default start directory

Hi,

if you use tmux you could notice that every time you create new window it starts in the directory where you initiated your Tmux session.

Usually I start my Tmux at home directory but when I work for a project I like to have all my windows to be opened in this particular project.

Sure I can close the session and start the new one from the project directory but... no.

The way you can do it from withing Tmux is press your <prefix>+: to open the command mode.

Now enter attach -c <your-default-start-directory>. That's all.

It works outside of Tmux as well. You can run it this way tmux attach-session -t <you session> -c <your-default-start-directory>.

Proxy Information
Original URL
gemini://g.codelearn.me/2018-12-14-tmux-change-default-start-dir.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
448.661512 milliseconds
Gemini-to-HTML Time
0.217614 milliseconds

This content has been proxied by September (ba2dc).