Skip to content

Commit 716b958

Browse files
YordanGeorgievbruno-
authored andcommitted
enable tilde expansion ( aka ~ ) into /home/ubuntu in saved session files's paths
1 parent abbc4fb commit 716b958

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/restore.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ new_window() {
130130
local dir="$4"
131131
local pane_index="$5"
132132
local pane_id="${session_name}:${window_number}.${pane_index}"
133+
dir="${dir/#\~/$HOME}"
133134
if is_restoring_pane_contents && pane_contents_file_exists "$pane_id"; then
134135
local pane_creation_command="$(pane_creation_command "$session_name" "$window_number" "$pane_index")"
135136
tmux new-window -d -t "${session_name}:${window_number}" -n "$window_name" -c "$dir" "$pane_creation_command"

0 commit comments

Comments
 (0)