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
edd8132b
Commit
edd8132b
authored
Sep 26, 2017
by
donat-b
Committed by
*Kim Zick (rummik)
Dec 27, 2018
Browse files
Add cmdline strategy
parent
b020b248
Changes
2
Hide whitespace changes
Inline
Side-by-side
save_command_strategies/cmdline.sh
0 → 100755
View file @
edd8132b
#!/usr/bin/env bash
CURRENT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
PANE_PID
=
"
$1
"
CPID
=
$(
pgrep
-P
$PANE_PID
)
exit_safely_if_empty_ppid
()
{
if
[
-z
"
$PANE_PID
"
]
;
then
exit
0
fi
}
full_command
()
{
[[
-z
"
$CPID
"
]]
&&
exit
0
base64
/proc/
${
CPID
}
/cmdline
}
main
()
{
exit_safely_if_empty_ppid
full_command
}
main
scripts/restore.sh
View file @
edd8132b
...
...
@@ -298,6 +298,9 @@ restore_all_pane_processes() {
while
IFS
=
$d
read
session_name window_number pane_index
dir
pane_full_command
;
do
dir
=
"
$(
remove_first_char
"
$dir
"
)
"
pane_full_command
=
"
$(
remove_first_char
"
$pane_full_command
"
)
"
if
base64
-d
<<<
$pane_full_command
>
/dev/null 2>&1
;
then
pane_full_command
=
$(
base64
-d
<<<
$pane_full_command
| perl
-ne
'print join(" ", map quotemeta, split(/\000/)), "\n"'
)
fi
restore_pane_process
"
$pane_full_command
"
"
$session_name
"
"
$window_number
"
"
$pane_index
"
"
$dir
"
done
fi
...
...
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