From 716b958145e2709e9fd3639ff24e1d1e4f26ff77 Mon Sep 17 00:00:00 2001 From: Yordan Georgiev Date: Mon, 14 Jun 2021 05:45:47 +0000 Subject: [PATCH] enable tilde expansion ( aka ~ ) into /home/ubuntu in saved session files's paths --- scripts/restore.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore.sh b/scripts/restore.sh index 85835af..373a210 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -130,6 +130,7 @@ new_window() { local dir="$4" local pane_index="$5" local pane_id="${session_name}:${window_number}.${pane_index}" + dir="${dir/#\~/$HOME}" if is_restoring_pane_contents && pane_contents_file_exists "$pane_id"; then local pane_creation_command="$(pane_creation_command "$session_name" "$window_number" "$pane_index")" tmux new-window -d -t "${session_name}:${window_number}" -n "$window_name" -c "$dir" "$pane_creation_command"