mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Change CPID
to something a little less cryptic
This commit is contained in:
parent
17cf30a69c
commit
2382467b8e
@ -3,7 +3,7 @@
|
|||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
PANE_PID="$1"
|
PANE_PID="$1"
|
||||||
CPID=$(pgrep -P $PANE_PID)
|
COMMAND_PID=$(pgrep -P $PANE_PID)
|
||||||
|
|
||||||
exit_safely_if_empty_ppid() {
|
exit_safely_if_empty_ppid() {
|
||||||
if [ -z "$PANE_PID" ]; then
|
if [ -z "$PANE_PID" ]; then
|
||||||
@ -12,8 +12,8 @@ exit_safely_if_empty_ppid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
full_command() {
|
full_command() {
|
||||||
[[ -z "$CPID" ]] && exit 0
|
[[ -z "$COMMAND_PID" ]] && exit 0
|
||||||
cat /proc/${CPID}/cmdline | xargs -0 printf "%q "
|
cat /proc/${COMMAND_PID}/cmdline | xargs -0 printf "%q "
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user