From a750628a44bc4957d42763f5a0b92e7670abdc9f Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Wed, 8 Jul 2015 00:14:40 +0200 Subject: [PATCH] Change 'save pane contents' directory --- CHANGELOG.md | 1 + scripts/helpers.sh | 6 +++++- scripts/save.sh | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fab2799..7af862c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - do not save empty trailing lines when pane content is saved - do not save pane contents if pane is empty (only for 'save pane contents' feature) +- "save pane contents" feature saves files to a separate directory ### v2.4.0, 2015-02-23 - add "tmux-test" diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 146ab71..b34c100 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -87,9 +87,13 @@ last_resurrect_file() { echo "$(resurrect_dir)/last" } +pane_contents_dir() { + echo "$(resurrect_dir)/pane_contents/" +} + pane_contents_file() { local pane_id="$1" - echo "$(resurrect_dir)/pane_contents-${pane_id}" + echo "$(pane_contents_dir)/pane-${pane_id}" } pane_contents_file_exists() { diff --git a/scripts/save.sh b/scripts/save.sh index fe84f1a..f888b53 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -259,6 +259,7 @@ save_all() { dump_state >> "$resurrect_file_path" ln -fs "$(basename "$resurrect_file_path")" "$(last_resurrect_file)" if capture_pane_contents_option_on; then + mkdir -p "$(pane_contents_dir)" dump_pane_contents fi if save_bash_history_option_on; then