Change CPID to something a little less cryptic

This commit is contained in:
*Kim Zick 2019-12-17 11:04:45 -05:00 committed by GitHub
parent 17cf30a69c
commit 2382467b8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() {