Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Salzmann-Jaeckel
tmux-resurrect
Commits
aa0b424c
Unverified
Commit
aa0b424c
authored
Jul 07, 2015
by
Bruno Sutic
Browse files
Refactoring
parent
852af790
Changes
3
Hide whitespace changes
Inline
Side-by-side
scripts/helpers.sh
View file @
aa0b424c
...
...
@@ -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
}
"
}
...
...
scripts/restore.sh
View file @
aa0b424c
...
...
@@ -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
()
{
...
...
scripts/save.sh
View file @
aa0b424c
...
...
@@ -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
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment