enable tilde expansion ( aka ~ ) into /home/ubuntu in saved session files's paths

pull/300/merge
Yordan Georgiev 2021-06-14 05:45:47 +00:00 committed by Bruno Sutic
parent abbc4fbfc4
commit 716b958145
No known key found for this signature in database
GPG Key ID: CAFA7B1B2914ED81
1 changed files with 1 additions and 0 deletions

View File

@ -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"