From aa0b424ca678906864911802d93b44a728165051 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Tue, 7 Jul 2015 23:35:00 +0200 Subject: [PATCH] Refactoring --- scripts/helpers.sh | 2 +- scripts/restore.sh | 2 +- scripts/save.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 5e2d7fc..b897d9d 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -87,7 +87,7 @@ last_resurrect_file() { echo "$(resurrect_dir)/last" } -resurrect_pane_file() { +pane_contents_file() { local pane_id="$1" echo "$(resurrect_dir)/pane_contents-${pane_id}" } diff --git a/scripts/restore.sh b/scripts/restore.sh index 8e0e37c..a1f48bf 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -108,7 +108,7 @@ tmux_default_command() { } pane_creation_command() { - echo "cat '$(resurrect_pane_file "${1}:${2}.${3}")'; exec $(tmux_default_command)" + echo "cat '$(pane_contents_file "${1}:${2}.${3}")'; exec $(tmux_default_command)" } new_window() { diff --git a/scripts/save.sh b/scripts/save.sh index e17e02f..b2a9d4f 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -117,7 +117,7 @@ capture_pane_contents() { if [ "$pane_contents_area" = "visible" ]; then start_line="0" fi - printf '%s\n' "$(tmux capture-pane -epJ -S "$start_line" -t "$pane_id")" > "$(resurrect_pane_file "$pane_id")" + printf '%s\n' "$(tmux capture-pane -epJ -S "$start_line" -t "$pane_id")" > "$(pane_contents_file "$pane_id")" } save_shell_history() {