mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Refactoring
This commit is contained in:
parent
852af79075
commit
aa0b424ca6
@ -87,7 +87,7 @@ last_resurrect_file() {
|
|||||||
echo "$(resurrect_dir)/last"
|
echo "$(resurrect_dir)/last"
|
||||||
}
|
}
|
||||||
|
|
||||||
resurrect_pane_file() {
|
pane_contents_file() {
|
||||||
local pane_id="$1"
|
local pane_id="$1"
|
||||||
echo "$(resurrect_dir)/pane_contents-${pane_id}"
|
echo "$(resurrect_dir)/pane_contents-${pane_id}"
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ tmux_default_command() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pane_creation_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() {
|
new_window() {
|
||||||
|
@ -117,7 +117,7 @@ capture_pane_contents() {
|
|||||||
if [ "$pane_contents_area" = "visible" ]; then
|
if [ "$pane_contents_area" = "visible" ]; then
|
||||||
start_line="0"
|
start_line="0"
|
||||||
fi
|
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() {
|
save_shell_history() {
|
||||||
|
Loading…
Reference in New Issue
Block a user