tmux-resurrect icon indicating copy to clipboard operation
tmux-resurrect copied to clipboard

Restoring non-existing directories

Open bart-jaskulski opened this issue 2 years ago • 0 comments

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.

bart-jaskulski avatar Sep 01 '23 07:09 bart-jaskulski