It would be nice if tmux-resurrect could restore session/window/pane path even if it not exists.
I heavily use /tmp directory in my daily work, serving as a scratchpad. I usually create such session with tmux new -c $(mktemp -d), landing in something like /tmp/tmp.cZXPfjfgzL, which is wiped out on device shutdown. While it isn't crucial to get back to the same directory after restoring sessions, currently the plugin leaves me at home dir.
I think there's a room for introducing optional feature of restoring directories (with a dedicated setting in tmux config). It would simply check if the directory exists and call mkdir -p $dir, possibly within restore_pane function, before actually creating any session/window/pane.
It would be nice if tmux-resurrect could restore session/window/pane path even if it not exists.
I heavily use
/tmp
directory in my daily work, serving as a scratchpad. I usually create such session withtmux new -c $(mktemp -d)
, landing in something like/tmp/tmp.cZXPfjfgzL
, which is wiped out on device shutdown. While it isn't crucial to get back to the same directory after restoring sessions, currently the plugin leaves me at home dir.I think there's a room for introducing optional feature of restoring directories (with a dedicated setting in tmux config). It would simply check if the directory exists and call
mkdir -p $dir
, possibly withinrestore_pane
function, before actually creating any session/window/pane.