Open
Description
Steps to reproduce:
- Start a new session.
cd
into a different directory.- If you open a new window in that session, the working directory for that window will be your home directory, not the directory you just changed to in the first window. This is expected tmux behaviour, because you never changed the session working directory.
- Using tmux-resurrect, save, kill, and restore tmux.
- The session working directory will now be the directory you changed into in step 2, even though you never changed it. So if you open a new window, the behaviour will now be different to what it was in step 3: its PWD will be the directory you changed to in step 2.
I always want my session working directory to by ~
. Every time I restore tmux, for each session, it sets the session working directory to be the directory of the first window in that session, so I have to go around running :a -c ~
in each affected session to set it back to ~
.