Change 'save pane contents' directory

This commit is contained in:
Bruno Sutic 2015-07-08 00:14:40 +02:00
parent 74773bed62
commit a750628a44
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
3 changed files with 7 additions and 1 deletions

View File

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

View File

@ -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() {

View File

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