From 4e1cdfa169bf56947080f545d6380855c09097f3 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 7 Jul 2023 11:25:04 +0800 Subject: [PATCH] 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. --- scripts/helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 20d87dc..520b4b9 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -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