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
2382467b
Unverified
Commit
2382467b
authored
Dec 17, 2019
by
*Kim Zick
Committed by
GitHub
Dec 17, 2019
Browse files
Change `CPID` to something a little less cryptic
parent
17cf30a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
save_command_strategies/linux_procfs.sh
View file @
2382467b
...
...
@@ -3,7 +3,7 @@
CURRENT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
PANE_PID
=
"
$1
"
CPID
=
$(
pgrep
-P
$PANE_PID
)
C
OMMAND_
PID
=
$(
pgrep
-P
$PANE_PID
)
exit_safely_if_empty_ppid
()
{
if
[
-z
"
$PANE_PID
"
]
;
then
...
...
@@ -12,8 +12,8 @@ exit_safely_if_empty_ppid() {
}
full_command
()
{
[[
-z
"
$CPID
"
]]
&&
exit
0
cat
/proc/
${
CPID
}
/cmdline | xargs
-0
printf
"%q "
[[
-z
"
$C
OMMAND_
PID
"
]]
&&
exit
0
cat
/proc/
${
C
OMMAND_
PID
}
/cmdline | xargs
-0
printf
"%q "
}
main
()
{
...
...
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