feat: append socket path to resurrect_dir

BREAKING: will break existing sessions,
since session save location is changed.

Supposed migration path (to be tested):
while Tmux is running, remove previous version of resurrect
(remove from Tmux conf & TPM uninstall), then install this version,
then save your session.
pull/481/head
Anton 2023-07-07 11:25:04 +08:00
parent cff343cf9e
commit 4e1cdfa169
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ pane_content_files_restore_from_archive() {
resurrect_dir() {
if [ -z "$_RESURRECT_DIR" ]; then
local path="$(get_tmux_option "$resurrect_dir_option" "$default_resurrect_dir")"
local path="$(get_tmux_option "$resurrect_dir_option" "$default_resurrect_dir")/$(basename $(tmux display-message -p -F "#{socket_path}"))"
# expands tilde, $HOME and $HOSTNAME if used in @resurrect-dir
echo "$path" | sed "s,\$HOME,$HOME,g; s,\$HOSTNAME,$(hostname),g; s,\~,$HOME,g"
else